|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-01 16:01 UTC] derick@php.net
-Status: Open
+Status: Not a bug
[2016-04-01 16:01 UTC] derick@php.net
[2016-04-01 18:24 UTC] snoopyf at gmx dot net
[2016-04-04 14:02 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 15:00:01 2025 UTC |
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)