Hi,
Kannst Du bitte mal die Ausgabe von
print_r($datenow);
print_r($datethen);auf Deinem System, wo der Fehler auftritt, posten?
Klar, da ist eigentlich alles wie erwartet:
DateTime Object
(
[date] => 2009-12-21 12:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
DateTime Object
(
[date] => 2009-12-20 12:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
Ob ich
$datenow->diff($datethen)
oder
$datethen->diff($datenow)
betrachte, ändert ausser dem Eintrag 'invert' im Ergebnis der Funktion auch nichts - 'days' bleiben 6015, während 'd' wie erwartet 1 ist, und alles andere 0.
MfG ChrisB
--
“Whoever best describes the problem is the person most likely to solve the problem.” [Dan Roam]
“Whoever best describes the problem is the person most likely to solve the problem.” [Dan Roam]