PHP default timezone warning

PHP Warning:  mktime(): 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 /var/www/...

If you encounter similar warning, then it means that you need to set default timezone used by all date/time functions.

Open php.ini configuration file and edit date.timezone setting:

date.timezone = "Europe/Warsaw"

In case of doubt check out list of supported timezones.

Milosz Galazka's Picture

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system.

Gdansk, Poland