This is almost a similar question for this: -
Working with time zones in PHP
I read this thread and a few more problems, and am not sure how to elegantly build time zone support in a PHP / MySQL application.
I am writing an application in PHP where users can select their time zone.
Here all timestamps are stored in GMT in MySQL. And I will convert the time zone back to the users time zone when presenting the data.
Now these are the problems I am facing: -
1) I am showing the user, a list of time zones filled with MySQL time zone tables is a HUGE list and it is difficult to select.
So, I want to implement something like a list of Windows time zones. Offset with region information.
2) PHP and MySQL may have a different set of lists.
3) Where should I convert time intervals to PHP or MySQL? I have a coding combination. Sometimes itβs easy to select a column converted from MySQL, sometimes itβs easy to convert it to PHP. So here the previous paragraph becomes very important. For example, in the MySQL time_zone tables, Asia / Calcutta and Asia / Calcutta were there, but in PHP 5.2.6, by default, only Asia / Calcutta is present in timezonedb.
timezone php mysql
Sabya Apr 27 '09 at 14:41 2009-04-27 14:41
source share