Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Performanceeinbruch bei mktime ?

Empfohlene Antworten

Veröffentlicht

hi,

folgendes Problem:

ich stelle einen Kalender dar, 6 Monate, alle Tage in üblicher ausrichtung jeweils eine Woche je zeile.

jeder Monat in einem eigenen block unsw.

Für jeden Tag wird eine SQL-Abfrage durchgeführt.

bisher war das kein Problem. Jedoch ist jetzt ein problem mit Sommer/Winterzeit aufgetaucht.

Ich gehen in einer Schleife alle Tage durch, und springe jeweils zum nächsten tag. (time + 86400), also 3600*24

Nun... habe ich den letzten Sonntag im Oktober immer Doppelt im Kalender.

Also denke ich mir, machen wir einfach ein wenig mehr Zeit drauf (+87000) und springen dann zum Anfang des Tages zurück.

$this->m_Time = $this->m_Time+86600;
$this->setDayStart();[/PHP]

[PHP]
$parts = split("\.",date("m.d.Y",$this->m_Time));
$this->m_Time = mktime(0,0,0,$parts[0],$parts[1],$parts[2]);

und nun, entweder habe ich Script-Timeout oder auf einem testsystem überschreitet das Script dann den maximal konfigurierten speicher.

Ideen ? weis jemand warum da dann plötzlich dieser extreme Sprung drin ist ?

ich benutze immer das gleiche objekt meiner Datumsklasse, somit dürfte auch kein Auflauf an müll-Daten im speicher sein

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.