ID: 22635 Updated by: [EMAIL PROTECTED] Reported By: jsteen at timecom dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: win32 PHP Version: 4.3.1 New Comment:
jsteen at timecom dot com: If you're pissed that the time functions are so 'buggy' on Win32, then why don't you step into the ring and help us debug it? Become part of the community, but don't drive the community away because you didn't get an answer you wanted. Please reopen this bug as you feel necessary, but i'm marking it as a bogus report due to the fact that it's an imcompatibility between Win32 and *nix systems, and also the fact that we can I'd finally like to redirect you to http://www.php.net/manual/en/function.mktime.php so you can read the user comments. Apparently different windows systems handle the timestamp differently. As said earlier, it's an incompatibility. ~ Andrew Heebner ~ Andrew Heebner Previous Comments: ------------------------------------------------------------------------ [2003-03-12 12:32:28] michael dot mauch at gmx dot de Please read the fine manual. From <http://www.php.net/manual/en/function.mktime.php>: "on systems where time_t is a 32bit signed integer, as most common today, the valid range for year is somewhere between 1902 and 2037". If you are using values outside this range, you get undefined behaviour. ------------------------------------------------------------------------ [2003-03-12 03:34:12] jsteen at timecom dot com WE F...ING KNOW mktime, gmmktime etc. WORK FINE ON *NIX! THIS IS A WIN REPORT! [flame: on] is it a new policy on bugs.php.net to NOT read post headers/declarations, write "works fine with linux" as answer, and put the bug on 'BOGUS'? i'm among the many users that are pissed that all the timestamp-functions are buggy on win. ok. fine. deal. but then please take our reports seriously and put a proper comment in the man! i really begin to wonder whether you're not just too lazy to seriously deal with it if i get this sorts of answers. [flame: off] so why does 1.1.1970 not have 24h? please omit any of the usual answers, like: - works fine for linux - blame MS ------------------------------------------------------------------------ [2003-03-11 11:15:13] [EMAIL PROTECTED] Works fine with Linux. ------------------------------------------------------------------------ [2003-03-11 07:53:26] jsteen at timecom dot com 1.1.1970 does not have 24 hours! --------------------------------------------- for ($i = 1 ; $i< 365; $i++){ $date = mktime(0,0,0,1,$i,1970); $date1 = mktime(0,0,0,1,$i+1,1970); echo "<br> $i: " .gmdate("Y m d", $date) . " "; echo ($date1 - $date ) /3600 ." h"; } --------------------------------------------- 1: 23.0002777778 h 2: 1970 01 01 24 h 3: 1970 01 02 24 h 4: 1970 01 03 24 h ... --------------------------------------------- for ($i = 1 ; $i< 365; $i++){ $date = gmmktime(0,0,0,1,$i,1970); $date1 = gmmktime(0,0,0,1,$i+1,1970); echo "<br> $i: " .gmdate("Y m d", $date) . " "; echo ($date1 - $date ) /3600 ." h"; } --------------------------------------------- 1: 24.0002777778 h 2: 1970 01 02 24 h 3: 1970 01 03 24 h 4: 1970 01 04 24 h ... --------------------------------------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22635&edit=1