From: Operating system: both Win7-64b and FreeBSD amd64 PHP version: 5.3.10 Package: Date/time related Bug Type: Bug Bug description:Wrong calculation of date() function from epoch
Description: ------------ After 2011-10-30 03:59:59, there should be 2011-10-30 04:00:00 there should not be 2011-10-30 03:00:00 Test script: --------------- <?php $t1 = "1319936371"; for ($i=0;$i<100;$i++) { $t = $t1+$i; echo date("Y-m-d H:i:s", $t)."<br>"; } ?> Expected result: ---------------- ... ... 1319936397 2011-10-30 03:59:57 1319936398 2011-10-30 03:59:58 1319936399 2011-10-30 03:59:59 1319936400 2011-10-30 04:00:00 1319936401 2011-10-30 04:00:01 1319936402 2011-10-30 04:00:02 ... ... Actual result: -------------- ... ... 1319936397 2011-10-30 03:59:57 1319936398 2011-10-30 03:59:58 1319936399 2011-10-30 03:59:59 1319936400 2011-10-30 03:00:00 1319936401 2011-10-30 03:00:01 1319936402 2011-10-30 03:00:02 ... ... -- Edit bug report at https://bugs.php.net/bug.php?id=60970&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60970&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60970&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60970&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60970&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60970&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60970&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60970&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60970&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60970&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60970&r=support Expected behavior: https://bugs.php.net/fix.php?id=60970&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60970&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60970&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60970&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60970&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60970&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60970&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60970&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60970&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60970&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60970&r=mysqlcfg