| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Accredited PayPal World Seller|
|MySQL time zone type?|
What is the best type to store time zones in MySQL?
| 9:19 am on May 14, 2010 (gmt 0)|
Simply put what is the best type to store time zones as?
For clarification an example of what I'm intending to use currently (unless there is something better that I'm currently unaware of): -5:00.
| 4:57 pm on May 20, 2010 (gmt 0)|
To store "-5:00" the only data type you could use is VARCHAR.
However, if you ever wanted to sort by that column, you'd probably want to convert those offsets into something like "-5.00" in which case you'd want to use FLOAT(4,2).
If it weren't for the rare half hour offsets, you could just use TINYINT SIGNED.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved