Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7194 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78072 invoked by uid 1010); 19 Jan 2004 23:48:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78036 invoked from network); 19 Jan 2004 23:48:09 -0000 Received: from unknown (HELO chicarcas.cimav.edu.mx) (148.223.46.30) by pb1.pair.com with SMTP; 19 Jan 2004 23:48:09 -0000 Received: from chicarcas.cimav.edu.mx (chicarcas.cimav.edu.mx [127.0.0.1]) by chicarcas.cimav.edu.mx (8.12.10/8.12.10) with ESMTP id i0JNp5Y1017977; Mon, 19 Jan 2004 16:51:05 -0700 Received: (from ion@localhost) by chicarcas.cimav.edu.mx (8.12.10/8.12.10/Submit) id i0JNp4ue017975; Mon, 19 Jan 2004 16:51:04 -0700 X-Authentication-Warning: chicarcas.cimav.edu.mx: ion set sender to ion@gluch.org.mx using -f Reply-To: ion@gluch.org.mx To: Wez Furlong Cc: internals@lists.php.net In-Reply-To: <031901c3dec7$97647ff0$8802a8c0@obsidian> References: <1074540058.13972.11.camel@chicarcas.cimav.edu.mx> <031901c3dec7$97647ff0$8802a8c0@obsidian> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Grupo Linux Chihuahua Message-ID: <1074556263.15164.29.camel@chicarcas.cimav.edu.mx> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Mon, 19 Jan 2004 16:51:04 -0700 Subject: Re: [PHP-DEV] mktime problem... From: ion@gluch.org.mx (Jonathan Hernandez) 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" > To: > 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: > > > > > $date = getdate(mktime(12, 0, 0, 1, 1 ,1959)); > > echo $date[0]." > > ".$date['mday']."-".$date['mon']."-".$date['year']."
"; > > $date = getdate(-347090400); > > echo $date[0]." > > ".$date['mday']."-".$date['mon']."-".$date['year']."
"; > > ?> > > > > 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? > >