ID: 32270
Updated by: [EMAIL PROTECTED]
Reported By: php at unfit dot org
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Linux 2.4.23
PHP Version: 4.3.10
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2005-03-11 03:22:06] php at unfit dot org
Description:
------------
Negative timestamps seem to work with the date function but not the
strtotime function. This occurs on all of the Gentoo Linux boxes I am
running on both kernel version 2.4.23 and 2.4.28. I am running PHP
4.3.10 and Apache/2.0.52.
Reproduce code:
---------------
<?php
echo date("m/d/Y H:i:s", -2145888000)."\n";
//01/01/1902 00:00:00
echo strtotime("Jan 1 1902")."\n";
//-1
echo date("m/d/Y H:i:s", -631123200)."\n";
//01/01/1950 00:00:00
echo strtotime("Jan 1 1950")."\n";
//-1
echo date("m/d/Y H:i:s", 946713600)."\n";
//01/01/2000 00:00:00
echo strtotime("Jan 1 2000")."\n";
//946713600
?>
Expected result:
----------------
01/01/1902 00:00:00
-2145888000
01/01/1950 00:00:00
-631123200
01/01/2000 00:00:00
946713600
Actual result:
--------------
01/01/1902 00:00:00
-1
01/01/1950 00:00:00
-1
01/01/2000 00:00:00
946713600
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32270&edit=1