| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|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 is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved