mktime() weirdness
Posted: Sat Sep 14, 2002 3:52 pm
Hello,
I am using the mktime() function to insert datetime values into a flat textfile.
The value are encoded with base64, and when I read them out and format them (date("d.m.Y", $erg) . " " . date("H:i", $erg)), I get the following strange values:
mktime(07, 33, 49, 03, 09, 2001) -> 28.02.2001 07:33
mktime(08, 23, 38, 03, 09, 2001) -> 28.02.2001 00:23
mktime(22, 47, 25, 04, 24, 2001) -> 24.04.2001 22:47 (correct)
mktime(20, 49, 01, 07, 04, 2001) -> 04.07.2001 20:49 (correct)
Why do I get wrong results in the first 2 cases?
Rainer
I am using the mktime() function to insert datetime values into a flat textfile.
The value are encoded with base64, and when I read them out and format them (date("d.m.Y", $erg) . " " . date("H:i", $erg)), I get the following strange values:
mktime(07, 33, 49, 03, 09, 2001) -> 28.02.2001 07:33
mktime(08, 23, 38, 03, 09, 2001) -> 28.02.2001 00:23
mktime(22, 47, 25, 04, 24, 2001) -> 24.04.2001 22:47 (correct)
mktime(20, 49, 01, 07, 04, 2001) -> 04.07.2001 20:49 (correct)
Why do I get wrong results in the first 2 cases?
Rainer