How to set the default PHP.INI timezone

Messages in error_log: Please use the date.timezone setting, PHP Strict Standards:  strtotime() [<a href=’function.strtotime’>function.strtotime</a>]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting

The default timezone setting in your PHP.INI is not set.

Edit you PHP.INI using your favourite editor eg.

# vi /etc/php.ini

Change this:

[Date]
; Defines the default timezone used by the date functions
; date.timezone =

To this:

[Date]
; Defines the default timezone used by the date functions
date.timezone = "Europe/London"

This will resolve the problem.

Was this helpful?
How to set the default PHP.INI timezone written by UKC average rating 3/5 - 4 user ratings

1 thought on “How to set the default PHP.INI timezone”

Comments are closed.