Re: Why does PHP consider the system's timezone unreliable, and is date_default_timezone_set() required?
| From: | Stuart Dallas | Date: | Mon, 17 Feb 2014 16:46:12 +0000 |
| Subject: | Re: Why does PHP consider the system's timezone unreliable, and is date_default_timezone_set() required? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322910@lists.php.net to get a copy of this message | ||
On 17 Feb 2014, at 13:14, Martin Tournoij <martin@arp242.net> wrote:
> Is this somehow unreliable? This is all POSIX stuff, so I would expect it to
> work well on at least all POSIX sysyems, or am I missing something?
It doesn’t mean unreliable in the technical sense, just that it’s very common for the timezone
of a server to be different from the timezone you want, so it forces you to make a choice. This
issue extends beyond shared hosting to dedicated servers where the person who set it up hasn’t
changed the timezone from the default. PHP is simply reminding you to check that the timezone is
what you want it to be rather than being surprised when it appears that the time is wrong.
There was much discussion about this on the internals mailing list when the notice was introduced,
so check those archives if you want more information.
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/