News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Daylight Savings time

Started by Uncle Don, November 30, 2011, 09:17:36 PM

Previous topic - Next topic

Uncle Don

How do I change the clock to fall back or move forward with Daylight Savings time?  How do I cange the time as it stands now?
In times like these it is wise to remember that there has always been times like these. - Paul Harvey

MrPhil

If you're on PHP 5.1 or later, you should be able to specify the timezone by name. Check if the settings table in the database has a default_timezone entry. If so, the easiest thing to do is to change it from Etc/GMT+n to your correct setting (e.g., America/New_York -- the list is http://www.php.net/manual/en/timezones.php). Not only will you get the correct time offset, but it will follow the correct Daylight Saving Time rules for your locale. If it does not already exist in the database, you can either add it manually or add an entry in your php.ini file: date.timezone = America/New_York. If you are at PHP 5.0 or earlier, you're out of luck and have to continue using the system hour offset (I presume that your server is GMT or otherwise doesn't follow DST). Any way you set your system (default) time, members still must use an hour offset (which means they follow your locale's DST rules).

Advertisement: