#13726 [Csd]: mktime bug
| From: | alan_k@php.net | Date: | Thu, 21 Nov 2002 01:57:29 +0000 |
| Subject: | #13726 [Csd]: mktime bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-25372@lists.php.net to get a copy of this message | ||
ID: 13726
Updated by: alan_k@php.net
Reported By: idisid@kyungmin.ac.kr
Status: Closed
Bug Type: Date/time related
Operating System: windows NT4.0
PHP Version: 4.0.6
New Comment:
try looking at the Date Package in PEAR
pear.php.net
Previous Comments:
------------------------------------------------------------------------
[2002-11-20 19:39:38] john@spamboxrecnot.com
My ISP is using a new release of glibc and now mktime strtotime are not
working for dates prior to 1970. I need to be able to add subtract a
day from dates between now and before 1870.... anybody ?
ie http://www.boxrec.com/date_search.php I need
to generate the dates
either side of the search date for the forward / backward links.
------------------------------------------------------------------------
[2002-11-14 06:46:59] derick@php.net
In our fine manual:
http://www.php.net/manual/en/function.date.php
------------------------------------------------------------------------
[2002-11-14 06:42:53] michael@liquidbytes.net
What's the offical suggestion for getting UNIX timestamps for dates <
1970? Or is it not allowed to use them this way?
BTW: The offical PHP docs say, that dates between 1902 and 2037 are
_allowed_. But you say "so stay away from undefined value ranges"!?
Very strange.
Can you explain that to the users/developers community?
------------------------------------------------------------------------
[2001-10-18 05:55:54] hholzgra@php.net
behaviour of unix timestamp functions for dates
before 1.1.1970 is simply undefined and depends
on the system *and* c library implementation you
use
so stay away from undefined value ranges :)
------------------------------------------------------------------------
[2001-10-18 02:31:32] idisid@kyungmin.ac.kr
mktime(0,0,0,1,1,1969);
is return -1.
but in linux renturn valid value;
maybe before 1970 bug in win32 version.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13726&edit=1