jcanker Posted November 10, 2010 Share Posted November 10, 2010 I just upgraded from 5.2.x to 5.3.3 this morning, and am now confronted with the "infamous" It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\Inetpub\wwwroot\ATSTest\sys\class\class.calendar.inc.php on line 98 Previously I just let php pull the system time to keep everything accurate with DST. Now that I'm having to use the date.timezone setting in php.ini, how can I tell it to factor in DST, or do I now have to manually perform a calculation in my methods/functions to check and adjust? Or does it automagically recognize the DST by setting it to date.timezone = America/New_York (yeah, right...what are the odds of *that*? Quote Link to comment Share on other sites More sharing options...
requinix Posted November 10, 2010 Share Posted November 10, 2010 PHP handles daylight savings automatically. Quote Link to comment Share on other sites More sharing options...
jcanker Posted November 10, 2010 Author Share Posted November 10, 2010 Wow...color me surprised...maybe I'm thinking too much of the early 4.x days Thanks for the quick response. Quote Link to comment Share on other sites More sharing options...
Anti-Moronic Posted November 10, 2010 Share Posted November 10, 2010 Does it? I was using php 5.* and it didn't work for daylight savings (UK). Quote Link to comment Share on other sites More sharing options...
requinix Posted November 10, 2010 Share Posted November 10, 2010 Does it? I was using php 5.* and it didn't work for daylight savings (UK). As long as the timezone information is up to date (ie, not using old DST rules) and you specify the right timezone, yes it should. Note that, in simplified terms, GMT is a timezone while UTC is a standard. If you use GMT (UTC+0) as your non-DST timezone then you should be fine because it becomes BST (UTC+1) during the summer. UTC, however, does not change. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.