This is almost similar question to this one: -
http://stackoverflow.com/questions/346770/dealing-with-timezones-in-php
I read that thread, and have some more issues, and not sure of how to elegantly build timezone support in PHP/MySQL application.
I am writing an application in PHP, where users can select their timezone.
Here, all timestamps are stored in GMT in MySQL. And I am converting the timezone back to users timezone, when presenting the data.
Now these are the problems I am facing: -
1) I show the user, a list of timezones populated from MySQL's timezone tables, it is a HUGE list and is difficult to chose from.
So, I want to implement something like windows time zone list. Offset with region info.
2) The PHP and MySQL may have different set of list.
3) Where should I convert timezones, in PHP or in MySQL? I have combination of coding. Sometimes it is easy to select a column converted from MySQL, sometimes it is easy to convert in PHP. So, here the previous point becomes very important. For example, in MySQL's time_zone tables Asia/Kolkata, and Asia/Calcutta both were there, but in PHP 5.2.6's default timezonedb, only Asia/Calcutta is present.