[EMAIL PROTECTED] wrote: > > As I understand it, the mysql TIMESTAMP type represents the time in your > local timezone (the one your computer is using). > > This makes it problematic to use in timezones that have a summer/daylight > savings time. All of the date arithmetic functions will yield inaccurate > results if one of the dates is in summer time and the other is in standard > time. > > For these reasons, I resort to using an INT field that stores "Unix" time > (seconds since the start of the Unix epoch, 00:00:00 UTC, January 1, 1970). > This makes the data independent of the database's time zone. I still use the > TIMESTAMP data type as a convenient way to keep tabs on when a row was modified, > if doing date arithmetic on the column is a concern.
I find myself doing this with a lot of databases as well, simply because it's more useful in Perl-land to have an epoch time value. It might be worthwile to have some way of retreiving a timestamp as an epoch value in addition to other fifty ways you can currently retrieve it. (If there already is a way, I'd be thrilled to hear about it.) -- John Klein, Database Applications Developer | Omnia Mutantur, Systems Group - Harvard Law School | Nihil Interit --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php