Jump to content

DST Timezone in php.ini?


jcanker

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.