Re: Think I found a PHP bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Nov 2011, Jim Lucas wrote:

Also, I recalled something from the early 5.1.0 version that was related to the
introduction of the date_timezone_set() function.  So, from there I searched
Google for "php changelog" and found the changelog for php v5.  Then I searched
that document for 'date_' and found that under the 5.1.0 they added the above
function.  How it is stated, it makes me think that PHP now requires you to call
this function prior to any use of other date functions.  I cannot find anything
in the php manual confirming my last statement.  YMMV

If you don't use date_default_timezone_set(), it's supposed to use the server timezone. I recalled reading that a notice/warning would be logged if you did this, but like you, I can't find any reference to this now. I've searched my apache error logs and can't find anything there either, which seems to suggest that this in fact is not the case.

In case it wasn't obvious in my original post, this worked just fine during UK summer time. It's only since the clocks changed two weeks ago that PHP has been thinking that the server timezone is UTC rather than Europe/London.

Geoff.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux