[aclug-L] Re: mysql, timestamps and timezones (oh my)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Monday 12 April 2004 08:20 pm, Jeff Vian wrote:
> Store the time as UCT.
> In this case all processes need to make adjustments to the location
> where the query is being performed, whether data storage or retreival.
> The adjustment is from local time to UCT and back.
There's another benefit, too. If you just create your field as a plain ol'
INT UNSIGNED, you can use the MySQL built-in function UNIX_TIMESTAMP() to get
the server-side time. This is *extremely* handy if you, say, have multiple
webservers but one database, and the webservers don't synchronize their
clocks with NTP.
Donald King, a.k.a. Chronos Tachyon
http://chronos.dyndns.org/ -- WWED?
Guardian of Eristic Paraphernalia
Gatekeeper of the Region of Thud
09:23:59 up 176 days, 23:32, 3 users, load average: 0.14, 0.08, 0.01
-- This is the discussion@xxxxxxxxx list. To unsubscribe,