Re: Re: [PHP] Think I found a PHP bug
| From: | Tim Streater | Date: | Thu, 17 Nov 2011 16:55:00 +0000 |
| Subject: | Re: Re: [PHP] Think I found a PHP bug | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-315726@lists.php.net to get a copy of this message | ||
On 16 Nov 2011 at 16:30, Geoff Shang <geoff@QuiteLikely.com> wrote:
> On Wed, 15 Nov 2011, Tim Streater wrote:
>
>> I find I need to do this:
>>
>> date_default_timezone_set (@date_default_timezone_get ());
>>
>> in all my scripts since 5.x.x to avoid rude messages.
>
> Apart from the fact that I've not seen the rude messages of which you
> speak, even though I expected to, this won't help in this case.
> date_default_timezone_get() is returning the wrong timezone.
Here's what I would otherwise get:
Warning: date(): 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 'UTC' for 'GMT/0.0/no DST' instead in /Users/tim/....
--
Cheers -- Tim