View Single Post
Old 11-24-2009, 09:27 AM   #1 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default Handling different timezone

On the shared hosting package I have the timezone is set to Central European Time for the php installation on the web server and the mysql database. I dont have root access to change this however i can alter settings using a php.ini file etc. I want to set both to London time. I was thinking of using this sql statement on every connection to the database:

SET time_zone = '-1:00';

I was also going to set the php time using this statement or alternatively just change it in the php.ini file:

ini_set('date.timezone', 'Europe/London');

The query I have is I've read somewhere that I will encounter problems when daylight saving changes etc come into play and the difference between CET and GMT isnt 1hr. I read somewhere that even setting the db timezone like this wont resolve this:

SET time_zone = 'Europe/London';

Anybody got any suggestions or guidance? Thanks.
captainmerton is offline  
Reply With Quote