Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

warning: strtotime(): It is not safe to rely on the system's timezone settings

Date: 2010-03-23 00:00:00 -0400

I am running Drupal 6, the last version by the time of writing.

I am getting this warnings when, updating / creating nodes, or when running the cron manually.

Warning: strtotime(): It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable 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 ‘America/Chicago’ for ‘CDT/-5.0/DST’ …..

The solution was pretty simple, just be sure to add in /etc/php.ini the time zone where your server is.

In my case “America/New_York”.

So a snip of /etc/php/php.ini is:

; http://php.net/date.timezone
date.timezone = America/New_York

Also be sure to restart Apache once that is done.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.