On 12 Mar 2003, at 22:25, Jason Brothers wrote: > I am just looking for feedback whether to use Datetime or > Unixtime (32 bit Int) for my timestamps.
You left out a major advantage of Unix time: you don't have to worry about changing time zones or daylight saving time. MySQL DATETIME doesn't include any information about its offset from UTC, so figuring out what time it really means can be a problem. That issue alone is enough to make me prefer Unix time for most things. You also left out an advantage of the DATETIME type: it covers a much larger range of time. If you have to deal with times before 1970 or after 2038 (admittedly, not many people do), then Unix time is not an option. I am curious why a DATE takes 3 bytes and a TIME takes 3 bytes, but a DATETIME takes 8 bytes, even though TIME covers a much greater range than the time part of a DATETIME, but that's just one of the mysteries of MySQL that's probably not worth losing sleep over. [Filter fodder: SQL] -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 --------------------------------------------------------------------- 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