From: kenny at tnsnurse dot com Operating system: Windows Server 2000 PHP version: 5.2.9 PHP Bug Type: Feature/Change Request Bug description: PHP 5.2 DST logic is bogus
Description: ------------ We do not need PHP to "force" us into accepting its Daylight Savings Time calculations. Both our database and web boxes are set to Standard time and we never switch them to DST. We don't WANT PHP's DST logic screwing with our dates because we don't care about DST when we're posting, reading, echoing, or even doing date diffs. But I don't see any way in 5.2.9 to tell it to ignore DST -- you're even deprecating the one switch that seemed to work in PHP 4.3. So if you're going to do that, we need a switch or an ini file parameter to tell PHP to ignore DST. Reproduce code: --------------- date("M j, Y H:i", (1237787999 - 86400). Exact code is << echo ">Week #{$row->periodid} WE " . date("M j, Y H:i", ($row->enddate - 86400)) >>. I gave you the 1237787999 as an example of a date we're retrieving from mysql. Expected result: ---------------- I expect to see March 21, 2009 23:59:59, unless you've redefined the mathematical result of 24 * 60 * 60. Actual result: -------------- The actual, "echoed-to-the-screeen" result of this is March 22, 2009 00:59:59. In what universe is this correct? The "1237787999" is an example of a correct date on our mysql database (returned in a variable and echoed) and it is the unix timestamp representation of March 22, 2009 23:59:59. If I subtract 86400 (which USED to be 24 hours) from that, I should get March 21, 2009 23:59:59. This should be simple arithmetic; I should not have to put up with PHP's DST stuff in doing this. -- Edit bug report at http://bugs.php.net/?id=48092&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48092&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48092&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48092&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48092&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48092&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48092&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48092&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48092&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48092&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48092&r=support Expected behavior: http://bugs.php.net/fix.php?id=48092&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48092&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48092&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48092&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48092&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48092&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48092&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48092&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48092&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48092&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48092&r=mysqlcfg