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*? Link to comment https://forums.phpfreaks.com/topic/218302-dst-timezone-in-phpini/ Share on other sites More sharing options...
requinix Posted November 10, 2010 Share Posted November 10, 2010 PHP handles daylight savings automatically. Link to comment https://forums.phpfreaks.com/topic/218302-dst-timezone-in-phpini/#findComment-1132669 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. Link to comment https://forums.phpfreaks.com/topic/218302-dst-timezone-in-phpini/#findComment-1132677 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). Link to comment https://forums.phpfreaks.com/topic/218302-dst-timezone-in-phpini/#findComment-1132712 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. Link to comment https://forums.phpfreaks.com/topic/218302-dst-timezone-in-phpini/#findComment-1132716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.