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 http://bugs.php.net/?id=40717&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40717&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40717&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40717&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40717&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40717&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40717&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40717&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40717&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40717&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40717&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40717&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40717&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40717&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40717&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40717&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40717&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40717&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40717&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40717&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40717&r=mysqlcfg