Re: mktime Problem
| From: | Michael Kimsal | Date: | Thu, 17 Aug 2000 15:11:19 +0000 |
| Subject: | Re: mktime Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12252@lists.php.net to get a copy of this message | ||
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...
>
> Would greatly appreciate it if anybody could tell me what's going on...
>
> Thanks
> Wong
--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961