Bug #71945 [NEW]: Wrong timecalc prior 1956 -> summertime?

From: Date: Fri, 01 Apr 2016 15:49:21 +0000
Subject: Bug #71945 [NEW]: Wrong timecalc prior 1956 -> summertime?
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200294@lists.php.net to get a copy of this message
From: snoopyf at gmx dot net Operating system: Linux PHP version: Irrelevant Package: Date/time related Bug Type: Bug Bug description:Wrong timecalc prior 1956 -> summertime? Description: ------------ Having this Unix Timestamp: -433044000 and date.timezone in php.ini is set to "Europe/Berlin" this function: date("Y-m-d H:i:s"); returns: 1956-04-11 23:00:00 Test script: --------------- <?php echo(date_default_timezone_get()); echo(date("Y-m-d H:i:s",-433044000)); ?> Expected result: ---------------- The result should be: 1956-04-12 00:00:00 For me this seems to be summertime - related as 1956 was the current beginnig of summertime changes... Checking with JavaScript on the same machine gives the correct result: <script language="JavaScript"> var d=new Date(-433044000*1000); // *1000 as JavaScripts Date works with milliseconds since epoch, not seconds document.write(d); </script> This Snippet returns: Thu Apr 12 1956 00:00:00 GMT+0200 (CET) -- Edit bug report at https://bugs.php.net/bug.php?id=71945&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71945&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71945&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71945&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71945&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71945&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71945&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71945&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71945&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71945&r=support Expected behavior: https://bugs.php.net/fix.php?id=71945&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71945&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71945&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71945&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71945&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71945&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71945&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71945&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71945&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71945&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71945&r=mysqlcfg

« previous php.bugs (#200294) next »