0

I've php 5.3.8 and Typo3 4.5.5 installed on my new webserver with lighttpd but now I'm getting this warning. My OS is a Suse 12.2 64 bit.

 FastCGI-stderr: PHP Warning:  date() [<a href='function.date'>function.date</a>]: 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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /htdocs/XXXX/t3lib/class.t3lib_div.php on line 5968
Micromega
  • 12,486
  • 7
  • 35
  • 72

2 Answers2

2

It's not related to Lighttpd nor Typo3, it's related to PHP.

You have to define a default timezone in your php.ini:

date.timezone = "Europe/Paris"

Otherwise, you can do it directly in your code (if you can't edit your php.ini):

date_default_timezone_set("Europe/Paris");
j0k
  • 22,600
  • 28
  • 79
  • 90
0

As of PHP 5.3 you have to explicitly set a timezone value for PHP. (Previous versions would fall back to using the OS's timezone setting if one wasn't explicitly given to PHP, but 5.3+ don't do that anymore.) Easiest way to do that is to set it in your php.ini; good HOWTO here.