I went through a lot of time / PHP posts, and most of them suggest storing your datetime fields in UTC, and then use the application’s time zone offset when storing and displaying time and time information.
The problem is that I inherited an application that was not known about the time zone, and now I need to satisfy this.
The server is already configured for "EST +11:00 Australia/Melbourne", and there are already applications running from this server. So I can’t change that.
Fortunately, I know the time zone offset of users, i.e., -05:00etc.
The application accepts Javascript dates and parses them using the PHP function strtotime()and stores them in a MySQL database, for example:
$event_starts = date('Y-m-d H:i:s',
strtotime('Thu Dec 02 2010 11:15:00 GMT+1100 (AUS Eastern Daylight Time)');
And does anyone have any suggestions on the best way to find out how I can make this application a timezone, given that the server is not configured for UTC?
Thanks a lot, J.
Jason source
share