Complete.Org: Mailing Lists: Archives: discussion: April 2004:
[aclug-L] Re: mysql, timestamps and timezones (oh my)
Home

[aclug-L] Re: mysql, timestamps and timezones (oh my)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: discussion@xxxxxxxxx
Subject: [aclug-L] Re: mysql, timestamps and timezones (oh my)
From: Donald King <donald.king@xxxxxxxxxxx>
Date: Tue, 13 Apr 2004 09:27:52 -0500
Reply-to: discussion@xxxxxxxxx

On Monday 12 April 2004 08:20 pm, Jeff Vian wrote:
  [Snip]
> Second
>     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.
>
  [Snip]

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,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]