Page 1 of 1

Output of date() differs from system time by 25 minutes

Posted: Sun Jul 13, 2008 5:35 am
by mtaylor
Bit of a strange problem here that I'm hoping someone can help me with:

Code: Select all

# date
Sun Jul 13 06:33:57 EDT 2008
 
 
# php
<?
echo date ('M j Y, H:m:s');
?>
Jul 13 2008, 06:07:55
 
# php
<?
echo date_default_timezone_get();
?>
America/New_York
 
 
The time as reported by the server is the correct one, and it seems that PHP is using the correct timezone, so I'm wondering why the difference?

Re: Output of date() differs from system time by 25 minutes

Posted: Sun Jul 13, 2008 6:06 am
by mtaylor
Hmm something is screwed. I spent a few minutes just refreshing one of my pages which displays the time, watching in increment. It was still showing as 7 minutes past 6, even though that's what it had showed 15 minutes ago. The seconds went up to 59, then back to zero but without the minute value increasing:/ That happened a few times, then the hour value suddenly jumped from 6 to 7, ie:

06:07:58
06:07:59
06:07:00
06:07:01
........
06:07:58
06:07:59
07:07:00
07:07:01
....
07:07:59
07:07:00



I'm using PHP 5.2.5 by the way

Re: Output of date() differs from system time by 25 minutes

Posted: Sun Jul 13, 2008 6:17 am
by VladSun
http://bg2.php.net/date
m Numeric representation of a month, with leading zeros 01 through 12