From: fear dot the dot golgota at gmail dot com Operating system: Linux Suse 9.3 professional PHP version: 5.1.2 PHP Bug Type: Date/time related Bug description: mktime strange result or leak of documentation
Description: ------------ According to documentation, setting is_dst to -1 can cause unexpected (but not incorrect) results. The result below demostrates the behavior of mktime or the documentation is wrong. Anyway it's better to explain why the is_dst paramater is deprecated since php 5.1.0. I check gmmktime, and the result is the same! Reproduce code: --------------- echo (mktime(2,0,0,3,31,1996,1)),"<br>"; echo (mktime(3,0,0,3,31,1996,1)),"<br><br>"; echo (mktime(2,0,0,3,31,1996,0)),"<br>"; echo (mktime(3,0,0,3,31,1996,0)),"<br><br>"; echo (mktime(2,0,0,3,31,1996,-1)),"<br>"; echo (mktime(3,0,0,3,31,1996,-1)),"<br><br>"; echo (gmmktime (2,0,0,3,31,1996)),"<br>"; echo (gmmktime (3,0,0,3,31,1996)),"<br>"; Expected result: ---------------- 4 blocks with 2 numbers. In each block, the pair of numbers must be different! Actual result: -------------- 828230400 828234000 828234000 828237600 828234000 828234000 828241200 828241200 -- Edit bug report at http://bugs.php.net/?id=36985&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36985&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36985&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36985&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36985&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36985&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36985&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36985&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36985&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36985&r=support Expected behavior: http://bugs.php.net/fix.php?id=36985&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36985&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36985&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36985&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36985&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36985&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36985&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36985&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36985&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36985&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36985&r=mysqlcfg