Well, I see that is a normal behavior of libc/mktime (it returns -1 if
an error was detected), I see others have the same problem and
implements their own php/mktime function (see the first comment on
http://www.php.net/mktime)... I wonder if it can be implemented directly
on the php function...

On Mon, 2004-01-19 at 13:05, Wez Furlong wrote:
> Your libc doesn't support negative time_t values.
> 
> --Wez.
> 
> ----- Original Message ----- 
> From: "Jonathan Hernandez" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 19, 2004 7:20 PM
> Subject: [PHP-DEV] mktime problem...
> 
> 
> > Hello,
> > 
> > I have a problem with mktime, when I try to run this:
> > 
> > <?php
> > $date = getdate(mktime(12, 0, 0, 1, 1 ,1959));
> > echo $date[0]."
> > ".$date['mday']."-".$date['mon']."-".$date['year']."<br/>";
> > $date = getdate(-347090400);
> > echo $date[0]."
> > ".$date['mday']."-".$date['mon']."-".$date['year']."<br/>";
> > ?>
> > 
> > Output:
> > -62 31-12-1969
> > -347090400 1-1-1959
> > 
> > I compile php5.0b3 on Fedora(gcc 3.3.2/ kernel 2.4.22), if I try to run
> > it on Debian (gcc 2.95.4 / kernel 2.6.0) it works fine, 
> > 
> > Output:
> > -347090400 1-1-1959
> > -347090400 1-1-1959
> > 
> > 
> > Both php are compiled with the same ./configure line...
> > 
> > 
> > Any idea about this?
> 
> 

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to