Ask a Question related to PHP Bugs, Design and Development.
-
manuel dot pinhao at nvisible dot pt #1
#40717 [NEW]: date "01-01-1968" inaccessible via date function
From: manuel dot pinhao at nvisible dot pt
Operating system: Windows XP SP2
PHP version: 5.2.1
PHP Bug Type: Date/time related
Bug description: date "01-01-1968" inaccessible via date function
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 bug report at [url]http://bugs.php.net/?id=40717&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40717&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40717&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40717&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40717&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=40717&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=40717&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40717&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=40717&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=40717&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=40717&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=40717&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=40717&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=40717&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40717&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=40717&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=40717&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40717&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=40717&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40717&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40717&r=mysqlcfg[/url]
manuel dot pinhao at nvisible dot pt Guest
-
#39106 [Opn->Bgs]: date("w") incompatible with date("W")
ID: 39106 Updated by: tony2001@php.net Reported By: felixmallek at gmx dot de -Status: Open +Status: ... -
#39106 [NEW]: date("w") incompatible with date("W")
From: felixmallek at gmx dot de Operating system: n/a PHP version: 5.1.6 PHP Bug Type: *Calendar problems Bug description: ... -
#24941 [Bgs]: strtotime returns same date for "first wednesday" and "second Wednesday"
ID: 24941 User updated by: jpage at javeo dot com Reported By: jpage at javeo dot com Status: Bogus Bug Type: ... -
#24941 [Opn->Bgs]: strtotime returns same date for "first wednesday" and "second Wednesday"
ID: 24941 Updated by: iliaa@php.net Reported By: jpage at javeo dot com -Status: Open +Status: Bogus... -
#24941 [NEW]: strtotime returns same date for "first wednesday" and "second Wednesday"
From: jpage at javeo dot com Operating system: Red Hat Linux PHP version: 4.3.1 PHP Bug Type: Date/time related Bug... -
iliaa@php.net #2
#40717 [Opn->Fbk]: date "01-01-1968" inaccessible via date function
ID: 40717
Updated by: [email]iliaa@php.net[/email]
Reported By: manuel dot pinhao at nvisible dot pt
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
New Comment:
Have you tried setting the timezone to UTC?
Previous Comments:
------------------------------------------------------------------------
[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 [url]http://bugs.php.net/?id=40717&edit=1[/url]
iliaa@php.net Guest
-
manuel dot pinhao at nvisible dot pt #3
#40717 [Fbk->Opn]: date "01-01-1968" inaccessible via date function
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:
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>";
}
Previous Comments:
------------------------------------------------------------------------
[2007-03-04 17:22:13] [email]iliaa@php.net[/email]
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 [url]http://bugs.php.net/?id=40717&edit=1[/url]
manuel dot pinhao at nvisible dot pt Guest
-
iliaa@php.net #4
#40717 [Opn->Fbk]: date "01-01-1968" inaccessible via date function
ID: 40717
Updated by: [email]iliaa@php.net[/email]
Reported By: manuel dot pinhao at nvisible dot pt
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
New Comment:
Have you tried setting the timezone via the php prescribed function:
date_default_timezone_set() ?
Previous Comments:
------------------------------------------------------------------------
[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]iliaa@php.net[/email]
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 [url]http://bugs.php.net/?id=40717&edit=1[/url]
iliaa@php.net Guest
-
manuel dot pinhao at nvisible dot pt #5
#40717 [Fbk->Opn]: date "01-01-1968" inaccessible via date function
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]iliaa@php.net[/email]
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]iliaa@php.net[/email]
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 [url]http://bugs.php.net/?id=40717&edit=1[/url]
manuel dot pinhao at nvisible dot pt Guest
-
iliaa@php.net #6
#40717 [Opn->Asn]: date "01-01-1968" inaccessible via date function
ID: 40717
Updated by: [email]iliaa@php.net[/email]
Reported By: manuel dot pinhao at nvisible dot pt
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
-Assigned To:
+Assigned To: Derick
New Comment:
The DST offset could move you to the next day, you may want to try to
pick 6-7 am on the 1st of Jan 1968 to see if that works.
Previous Comments:
------------------------------------------------------------------------
[2007-03-04 18:36:37] manuel dot pinhao at nvisible dot pt
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?
------------------------------------------------------------------------
[2007-03-04 18:17:45] [email]iliaa@php.net[/email]
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]iliaa@php.net[/email]
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 [url]http://bugs.php.net/?id=40717&edit=1[/url]
iliaa@php.net Guest
-
derick@php.net #7
#40717 [Asn]: date "01-01-1968" inaccessible via date function
ID: 40717
Updated by: [email]derick@php.net[/email]
Reported By: manuel dot pinhao at nvisible dot pt
Status: Assigned
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
Assigned To: derick
New Comment:
This works fine for me (on Linux):
-63158410: 31-12-1967 23:59:50 (UTC)
-63158409: 31-12-1967 23:59:51 (UTC)
-63158408: 31-12-1967 23:59:52 (UTC)
-63158407: 31-12-1967 23:59:53 (UTC)
-63158406: 31-12-1967 23:59:54 (UTC)
-63158405: 31-12-1967 23:59:55 (UTC)
-63158404: 31-12-1967 23:59:56 (UTC)
-63158403: 31-12-1967 23:59:57 (UTC)
-63158402: 31-12-1967 23:59:58 (UTC)
-63158401: 31-12-1967 23:59:59 (UTC)
-63158400: 01-01-1968 00:00:00 (UTC)
-63158399: 01-01-1968 00:00:01 (UTC)
-63158398: 01-01-1968 00:00:02 (UTC)
-63158397: 01-01-1968 00:00:03 (UTC)
-63158396: 01-01-1968 00:00:04 (UTC)
-63158395: 01-01-1968 00:00:05 (UTC)
-63158394: 01-01-1968 00:00:06 (UTC)
-63158393: 01-01-1968 00:00:07 (UTC)
-63158392: 01-01-1968 00:00:08 (UTC)
-63158391: 01-01-1968 00:00:09 (UTC)
-63158390: 01-01-1968 00:00:10 (UTC)
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 00:11:56] [email]iliaa@php.net[/email]
The DST offset could move you to the next day, you may want to try to
pick 6-7 am on the 1st of Jan 1968 to see if that works.
------------------------------------------------------------------------
[2007-03-04 18:36:37] manuel dot pinhao at nvisible dot pt
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?
------------------------------------------------------------------------
[2007-03-04 18:17:45] [email]iliaa@php.net[/email]
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]iliaa@php.net[/email]
Have you tried setting the timezone to UTC?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/40717[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=40717&edit=1[/url]
derick@php.net Guest
-
manuel dot pinhao at nvisible dot pt #8
#40717 [Asn]: date "01-01-1968" inaccessible via date function
ID: 40717
User updated by: manuel dot pinhao at nvisible dot pt
Reported By: manuel dot pinhao at nvisible dot pt
Status: Assigned
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
Assigned To: derick
New Comment:
Yes, this seems to be a windows-only problem. I've tested it on Linux
and it works as expected.
Regarding DST, I'm no expert on this matter, but DST could probably
'bump' time one hour forwards or backwards, not lose a whole day. As
for testing 6-7 AM, I wasn't able to target any hours in 01-01-1968.
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 10:03:49] [email]derick@php.net[/email]
This works fine for me (on Linux):
-63158410: 31-12-1967 23:59:50 (UTC)
-63158409: 31-12-1967 23:59:51 (UTC)
-63158408: 31-12-1967 23:59:52 (UTC)
-63158407: 31-12-1967 23:59:53 (UTC)
-63158406: 31-12-1967 23:59:54 (UTC)
-63158405: 31-12-1967 23:59:55 (UTC)
-63158404: 31-12-1967 23:59:56 (UTC)
-63158403: 31-12-1967 23:59:57 (UTC)
-63158402: 31-12-1967 23:59:58 (UTC)
-63158401: 31-12-1967 23:59:59 (UTC)
-63158400: 01-01-1968 00:00:00 (UTC)
-63158399: 01-01-1968 00:00:01 (UTC)
-63158398: 01-01-1968 00:00:02 (UTC)
-63158397: 01-01-1968 00:00:03 (UTC)
-63158396: 01-01-1968 00:00:04 (UTC)
-63158395: 01-01-1968 00:00:05 (UTC)
-63158394: 01-01-1968 00:00:06 (UTC)
-63158393: 01-01-1968 00:00:07 (UTC)
-63158392: 01-01-1968 00:00:08 (UTC)
-63158391: 01-01-1968 00:00:09 (UTC)
-63158390: 01-01-1968 00:00:10 (UTC)
------------------------------------------------------------------------
[2007-03-05 00:11:56] [email]iliaa@php.net[/email]
The DST offset could move you to the next day, you may want to try to
pick 6-7 am on the 1st of Jan 1968 to see if that works.
------------------------------------------------------------------------
[2007-03-04 18:36:37] manuel dot pinhao at nvisible dot pt
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?
------------------------------------------------------------------------
[2007-03-04 18:17:45] [email]iliaa@php.net[/email]
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>";
}
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/40717[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=40717&edit=1[/url]
manuel dot pinhao at nvisible dot pt Guest
-
derick@php.net #9
#40717 [Asn]: date "01-01-1968" inaccessible via date function
ID: 40717
Updated by: [email]derick@php.net[/email]
Reported By: manuel dot pinhao at nvisible dot pt
Status: Assigned
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 5.2.1
Assigned To: derick
New Comment:
Portugal didn't do DST between 1966 and 1976, so that is not the issue.
I'll have to see what I get on Windows once that POS wants to boot again
:)
Previous Comments:
------------------------------------------------------------------------
[2007-03-05 10:20:38] manuel dot pinhao at nvisible dot pt
Yes, this seems to be a windows-only problem. I've tested it on Linux
and it works as expected.
Regarding DST, I'm no expert on this matter, but DST could probably
'bump' time one hour forwards or backwards, not lose a whole day. As
for testing 6-7 AM, I wasn't able to target any hours in 01-01-1968.
------------------------------------------------------------------------
[2007-03-05 10:03:49] [email]derick@php.net[/email]
This works fine for me (on Linux):
-63158410: 31-12-1967 23:59:50 (UTC)
-63158409: 31-12-1967 23:59:51 (UTC)
-63158408: 31-12-1967 23:59:52 (UTC)
-63158407: 31-12-1967 23:59:53 (UTC)
-63158406: 31-12-1967 23:59:54 (UTC)
-63158405: 31-12-1967 23:59:55 (UTC)
-63158404: 31-12-1967 23:59:56 (UTC)
-63158403: 31-12-1967 23:59:57 (UTC)
-63158402: 31-12-1967 23:59:58 (UTC)
-63158401: 31-12-1967 23:59:59 (UTC)
-63158400: 01-01-1968 00:00:00 (UTC)
-63158399: 01-01-1968 00:00:01 (UTC)
-63158398: 01-01-1968 00:00:02 (UTC)
-63158397: 01-01-1968 00:00:03 (UTC)
-63158396: 01-01-1968 00:00:04 (UTC)
-63158395: 01-01-1968 00:00:05 (UTC)
-63158394: 01-01-1968 00:00:06 (UTC)
-63158393: 01-01-1968 00:00:07 (UTC)
-63158392: 01-01-1968 00:00:08 (UTC)
-63158391: 01-01-1968 00:00:09 (UTC)
-63158390: 01-01-1968 00:00:10 (UTC)
------------------------------------------------------------------------
[2007-03-05 00:11:56] [email]iliaa@php.net[/email]
The DST offset could move you to the next day, you may want to try to
pick 6-7 am on the 1st of Jan 1968 to see if that works.
------------------------------------------------------------------------
[2007-03-04 18:36:37] manuel dot pinhao at nvisible dot pt
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?
------------------------------------------------------------------------
[2007-03-04 18:17:45] [email]iliaa@php.net[/email]
Have you tried setting the timezone via the php prescribed function:
date_default_timezone_set() ?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/40717[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=40717&edit=1[/url]
derick@php.net Guest



Reply With Quote

