I have a web app which I want to work internationally.
I can ask each user their time zone and store it, no problem. Then I’m looking to store all dates in UTC and make the adjustments when transacting from the database.
Firstly, is this the best way to do it, or are there any other suggestions?
Secondly, does anybody know how best to convert the timezones when going to and from the database? Could I create some clever layer (in the zend framework) that does this automatically based on the php environment timezone, or would I need to update all of my queries?
Many thanks!
Zend_Date does all of this and much more .