Best way to set the timezone
Posted: Tue May 26, 2009 6:46 am
What is the best way to set the time zone? I have a website with user accounts and I want to users to have the ability to select their timezone.
I found this function: http://au2.php.net/date_default_timezone_set ans I also found putenv("TZ=US/Eastern"); which looks a bit dodgey to me...
What is the normal practice for changing time zone for user accounts? And what happens when the user changes their timezone? Does that mess up the dates or will it switch over? I am currently storing dates as DATETIME in the database.
Thanks for your help!
I found this function: http://au2.php.net/date_default_timezone_set ans I also found putenv("TZ=US/Eastern"); which looks a bit dodgey to me...
What is the normal practice for changing time zone for user accounts? And what happens when the user changes their timezone? Does that mess up the dates or will it switch over? I am currently storing dates as DATETIME in the database.
Thanks for your help!