#23475 [Opn->Bgs]: mktime() of dates before 1 jan 1970 gives a timestamp of "-3662"
| From: | derick@php.net | Date: | Sun, 04 May 2003 17:23:15 +0000 |
| Subject: | #23475 [Opn->Bgs]: mktime() of dates before 1 jan 1970 gives a timestamp of "-3662" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39035@lists.php.net to get a copy of this message | ||
ID: 23475
Updated by: derick@php.net
Reported By: guy dot mersch at pandora dot be
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.3.1
New Comment:
Right, it's not a bug in PHP then -> bogus (There is somebody working
on an extension for PHP 5 to address this AFAIK).
Previous Comments:
------------------------------------------------------------------------
[2003-05-04 11:44:14] guy dot mersch at pandora dot be
There seems to be indeed a problem with glibc 2.2.5 and
the mktime function for dates earlier than 01/01/1970
This could be a solution:
adodb_time library uses PHP code to calculate negative
timestamps.
http://php.weblogs.com/adodb_date_time_library
------------------------------------------------------------------------
[2003-05-04 10:35:24] guy dot mersch at pandora dot be
the linux server uses glibc 2.2.5 stable
------------------------------------------------------------------------
[2003-05-04 05:58:14] derick@php.net
But that's not a bug in PHP, but more in your glibc :) Which version of
glibc do you use? AFAIK the 2.3.x series return an undefined value for
dates smaller than 1 - 1 - 1970, much like Windows does.
------------------------------------------------------------------------
[2003-05-04 05:55:15] guy dot mersch at pandora dot be
Problem is that once you want to create a Timestamp for
dates earlier than 1 Jan 1970 you always get "-3662" no
matter what date you filled in.
------------------------------------------------------------------------
[2003-05-04 05:42:40] derick@php.net
What is the problem here?
------------------------------------------------------------------------
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
http://bugs.php.net/23475
--
Edit this bug report at http://bugs.php.net/?id=23475&edit=1