> -----Original Message----- > From: Per Jessen [mailto:[EMAIL PROTECTED] > Sent: Friday, June 13, 2008 5:17 AM > To: mysql@lists.mysql.com > Subject: what is the proper way to store timezone information? > > All, > > I will be recording timezone information based on user input using the > time zone names from mysql.time_zone_name - names > like 'America/Los_Angeles'. > > When recording this information, do I store the full name or just > the 'time_zone_id' which is present in mysql.time_zone_name ?
This is entirely a matter of choice. It's like asking if you should store formatting when you insert phone numbers into a database--is it easier for you to parse back if you do so? If yes, then store the formatting. If no/probably not/I don't need to parse it, then just store it without. I'd say if it's easier (or perhaps more efficient, if this is a concern) for you to simply store the time_zone_id value, then do it that way. It's not as if it won't store your data if you store the time_zone_name... it just might be harder to use as a variable later, being text instead of an identifying number. Again... totally a matter of your preference. Todd Boyd Web Programmer