ID: 40717 User updated by: manuel dot pinhao at nvisible dot pt Reported By: manuel dot pinhao at nvisible dot pt -Status: Feedback +Status: Open Bug Type: Date/time related Operating System: Windows XP SP2 PHP Version: 5.2.1 New Comment:
same output with the following code: date_default_timezone_set("UTC"); foreach (range(-63158410,-63158390) as $s) { echo $s.': '.date("d-m-Y H:i:s (T)",$s)."<br>"; } Shouldn't this work regardless of the timezone? How can we have a 'disappearing' day? Previous Comments: ------------------------------------------------------------------------ [2007-03-04 18:17:45] [EMAIL PROTECTED] Have you tried setting the timezone via the php prescribed function: date_default_timezone_set() ? ------------------------------------------------------------------------ [2007-03-04 17:43:11] manuel dot pinhao at nvisible dot pt I get the same output with this code: putenv("TZ=UTC"); foreach (range(-63158410,-63158390) as $s) { echo $s.': '.date("d-m-Y H:i:s (T)",$s)."<br>"; } ------------------------------------------------------------------------ [2007-03-04 17:22:13] [EMAIL PROTECTED] Have you tried setting the timezone to UTC? ------------------------------------------------------------------------ [2007-03-04 17:01:31] manuel dot pinhao at nvisible dot pt Description: ------------ I've found it impossible to access the date "01-01-1968" via date/mktime. Reproduce code: --------------- foreach (range(-63158410,-63158390) as $s) { echo $s.': '.date("d-m-Y H:i:s",$s)."<br>"; } Expected result: ---------------- -63158410: 31-12-1967 23:59:50 -63158409: 31-12-1967 23:59:51 -63158408: 31-12-1967 23:59:52 -63158407: 31-12-1967 23:59:53 -63158406: 31-12-1967 23:59:54 -63158405: 31-12-1967 23:59:55 -63158404: 31-12-1967 23:59:56 -63158403: 31-12-1967 23:59:57 -63158402: 31-12-1967 23:59:58 -63158401: 31-12-1967 23:59:59 -63158400: 01-01-1968 00:00:00 -63158399: 01-01-1968 00:00:01 -63158398: 01-01-1968 00:00:02 -63158397: 01-01-1968 00:00:03 -63158396: 01-01-1968 00:00:04 -63158395: 01-01-1968 00:00:05 -63158394: 01-01-1968 00:00:06 -63158393: 01-01-1968 00:00:07 -63158392: 01-01-1968 00:00:08 -63158391: 01-01-1968 00:00:09 -63158390: 01-01-1968 00:00:10 Actual result: -------------- -63158410: 31-12-1967 23:59:50 -63158409: 31-12-1967 23:59:51 -63158408: 31-12-1967 23:59:52 -63158407: 31-12-1967 23:59:53 -63158406: 31-12-1967 23:59:54 -63158405: 31-12-1967 23:59:55 -63158404: 31-12-1967 23:59:56 -63158403: 31-12-1967 23:59:57 -63158402: 31-12-1967 23:59:58 -63158401: 31-12-1967 23:59:59 -63158400: 02-01-1968 00:00:00 -63158399: 02-01-1968 00:00:01 -63158398: 02-01-1968 00:00:02 -63158397: 02-01-1968 00:00:03 -63158396: 02-01-1968 00:00:04 -63158395: 02-01-1968 00:00:05 -63158394: 02-01-1968 00:00:06 -63158393: 02-01-1968 00:00:07 -63158392: 02-01-1968 00:00:08 -63158391: 02-01-1968 00:00:09 -63158390: 02-01-1968 00:00:10 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40717&edit=1