#40645 [Opn->Fbk]: strtotime don't work with negative timestamps
| From: | derick@php.net | Date: | Mon, 26 Feb 2007 18:01:02 +0000 |
| Subject: | #40645 [Opn->Fbk]: strtotime don't work with negative timestamps | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109586@lists.php.net to get a copy of this message | ||
ID: 40645
Updated by: derick@php.net
Reported By: simone at ivg dot it
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Linux 2.6
PHP Version: 4.4.5
New Comment:
This works fine for me with PHP 4.4.6RC2-dev:
<?php
echo strtotime("1951-12-22"), "\n";
?>
-568947600
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 17:55:41] simone at ivg dot it
Description:
------------
The strtotime() function returns -1 if the date is prior to
1970-01-01.
Instead, date function works properly with negative timestamps.
Reproduce code:
---------------
strtotime("1951-12-22") returns -1
date("d/m/Y",-578944001) returns 28/08/1951
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40645&edit=1