Re: mktime Problem

From: Date: Sat, 19 Aug 2000 02:50:44 +0000
Subject: Re: mktime Problem
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-12399@lists.php.net to get a copy of this message
Am rather fearful that it might very well be a hardware problem... another thing was that the results only switched if you reloaded the page continuosly... I tried running that particular code block in a loop and the result would remain constant throughout the loop... Of course, I can't say that it proves anything, but reloading the page would yield the 2 results rather quickly while a loop of 100 times in the same script would have the same results all the time. PHP version is 3.0.16 and OS is Redhat 6.2 all our other servers are running Redhat 6.1... I'm wondering if this is a problem with the libs in Redhat 6.2... Thanks Wong ----- Original Message ----- From: "Michael Kimsal" <michael@tapinternet.com> To: "FCP Wong" <feicipet@plasticscommerce.com> Cc: <php-general@lists.php.net> Sent: Thursday, August 17, 2000 11:11 PM Subject: Re: [PHP] mktime Problem > Having JUST had date/time problems, this one caught my eye. However, > running your code, I always get the #1 result - never got #2 yet. > Could this be a hardware problem perhaps? > > What version PHP/OS/hardware are you using? > > FCP Wong wrote: > > > Hi, > > > > I'm not sure why but the mktime function on my php installation consistently shows different values at erratic intervals... > > > > For eg when I call : mktime (0,0,0,1,1,1998) > > > > the result i get is either 883584000 or 883641600... > > > > I was trying to debug why my cookies will not be accepted by IE... > > > > a code block as such : > > --------- > > $myTime = mktime (0,0,0,1,1,1998); > > print "<br>My Time is $myTime"; > > echo date ("<br>M d Y H:i:s", $myTime); > > echo gmdate ("<br>M d Y H:i:s", $myTime); > > > > --------- > > > > results in these 2 different sets of results : > > > > 1) > > My Time is 883641600 > > Jan 01 1998 00:00:00 > > Jan 01 1998 08:00:00 > > > > 2) > > My Time is 883584000 > > Jan 01 1998 00:00:00 > > Dec 31 1997 16:00:00 > > > > and the results are *consistently* one of these 2... there doesn't seem to be any ordering between the 2 result sets... they seem to interchange randomly... > >

« previous php.general (#12399) next »