[TYPO3-dev] Datetime bug in 4.2 - SOLUTION

Dmitry Dulepov [typo3] dmitry at typo3.org
Fri May 23 22:25:22 CEST 2008


Hi!

lee perry wrote:
> I think it is set correctly - phpinfo:
> 
> date/time support            enabled
> "Olson" Timezone Database Version    2007.9
> Timezone Database            internal
> Default timezone            Europe/Berlin
> 
> Is that what you mean?

It will show this value even if nothing is really set. But it is not used sometimes. I could not find any pattern. I made a very simple page that shows a time using PHP. Refresh gave me GMT time sometimes. Not always but sometimes. So you should truly go and see what you have as timezone in "date.timezone". It must not be empty. PHP documentations says:

=========================
To ensure accuracy (and avoid an E_STRICT warning), you will need to define your timezone in your php.ini using the following format: 

date.timezone = Europe/London 
=========================

By default this value is always empty. I found that setting this value to "Europe/Riga" (this is where I am) solved random time problem and random failures of date/strftime functions.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
"Nothing is impossible. There are only limits to our knowledge"




More information about the TYPO3-dev mailing list