Re: question about GMT and UTC
- From: Snef <s.franke@xxxxxxxxxx>
- Date: Tue, 01 Aug 2006 00:50:28 +0200
date() returns server time. gmdate returns GMT (UTC) time.
All the dates in my database are stored as GMT/UTC and I display the users local time onscreen.
Marcus wrote:
Marcus wrote:.Hello,
I need a timezone to store timestamps in that is independent of daylight saving. From everything I've read, it seems I want either GMT or UTC. The only problem is I can't figure out from any documentation I've read if there is any difference (practically speaking, not scientifically and taking into account the earth's orbit etc).
I can set my server timezone to GMT, but if I want UTC I will have to use putenv('TZ=UTC'). Could someone please confirm if they are in fact the same or if one is better, and if I am correct in stating that neither is affected by daylight saving? Lastly, if I set my server to GMT (or UTC for that matter), am I also correct in saying that in that case gmmktime() and gmdate() are the exact same as mktime() and date()? Thank you very much in advance for your help.
I should elaborate on my first point and ask additionally if a call to:
mktime(12, 0, 0, 5, 10, 2007);
for example, will always return the exact same timestamp in either GMT or UTC timezone and vice versa, i.e. 1 timestamp resulting in the exact same 12:00:00 readout via date() whether GMT or UTC. Thanks.
- Follow-Ups:
- Re: question about GMT and UTC
- From: Marcus
- Re: question about GMT and UTC
- References:
- question about GMT and UTC
- From: Marcus
- Re: question about GMT and UTC
- From: Marcus
- question about GMT and UTC
- Prev by Date: Re: _SESSION weirdness behind a NAT firewall/router: bug?
- Next by Date: Re: question about GMT and UTC
- Previous by thread: Re: question about GMT and UTC
- Next by thread: Re: question about GMT and UTC
- Index(es):
Relevant Pages
|