note 31601 deleted from function.time by alindeman
| From: | alindeman@php.net | Date: | Sun, 27 Apr 2003 21:02:27 +0000 |
| Subject: | note 31601 deleted from function.time by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-47181@lists.php.net to get a copy of this message | ||
Ok, now I'm confused.
I'd like to think that date() is adding 1h to the timestamp because I'm at GMT+1 whereas
gmdate() is doing nothing to the stamp. So I called:
echo date ("M d Y H:i:s", 0);
echo gmdate ("M d Y H:i:s", 0);
echo date ("M d Y H:i:s", mktime (5,0,0,1,1,1998));
echo gmdate("M d Y H:i:s", mktime (5,0,0,1,1,1998));
which gave me the expected
Jan 01 1970 01:00:00
Jan 01 1970 00:00:00 and
Jan 01 1998 05:00:00
Jan 01 1998 04:00:00
Then I tried:
echo date ("M d Y H:i:s", time());
echo gmdate("M d Y H:i:s", time());
which produced
Apr 27 2003 22:48:11
Apr 27 2003 20:48:11
Seems pretty odd, but since GMT measures time since January, it knows nothing of daylight savings.
And since now its during daylight saving gmdate accomodates for that. You have to keep that in mind.