#22436 [Opn->Csd]: Valid solution for working with < 1969 dates
| From: | nlopess@php.net | Date: | Sat, 13 Aug 2005 19:30:36 +0000 |
| Subject: | #22436 [Opn->Csd]: Valid solution for working with < 1969 dates | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83544@lists.php.net to get a copy of this message | ||
ID: 22436
Updated by: nlopess@php.net
Reported By: ivo at ibuildings dot nl
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Redhat Linux
PHP Version: 4.3.0
New Comment:
Fixed in PHP 5.1.
Previous Comments:
------------------------------------------------------------------------
[2004-01-10 10:24:57] pajoye@php.net
Hello,
As a sidenote, I just commited pecl/date which support date ranges
lower than unix Epoc. Win32 snaps are available through
http://snaps.php.net/win32/PECL_UNSTABLE/
hth
pierre
------------------------------------------------------------------------
[2003-02-28 02:13:01] ivo at ibuildings dot nl
There's a library (part of adodb) to work around the negative date
problem on windows. It can be modified to perform the same
functionality on linux, when mktime does not work as expected there.
This lib can be found here:
http://php.weblogs.com/adodb_date_time_library
Perhaps this functionality can be made a standard in php? In other
words, make mktime behave exactly like the adodb_mktime function from
this library etc.?
------------------------------------------------------------------------
[2003-02-26 09:26:08] iliaa@php.net
Just a a note, PEAR has a date class capable of handling dates prior to
1969.
------------------------------------------------------------------------
[2003-02-26 08:22:23] ivo at ibuildings dot nl
Hi,
working with dates before 1970 with mktime sometimes works, sometimes
doesn't.
There are several bugs in the bug database describing this problem: bug
#18802, bug #22163 and bug #20280.
All are answered with stuff like "behaviour of mktime before 1970 is
undefined", "it's not a php bug because it's due to glibc" etc.
While all of these are most certainly true, it's not really a helpful
answer to php users. PHP users just want to do stuff with dates. When
working with birthdates, dates from before 1970 are quite common.
Therefor, I request that the php date/time functions will be made such
that they *work*, regardless of the operating system, the glibc version
etc.
Would you please consider doing this?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22436&edit=1