Jump to content

[SOLVED] strtotime() error with 0000-00-00 00:00:00 format?


tjhilder

Recommended Posts

I get this error:

 

An error occurred in script '/home/tjhilder/public_html/work/portfolio/cmsdemo/includes/news/news_list.inc.php' on line 60: strtotime() [function.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 'Europe/London' for 'BST/1.0/DST' instead

 

the code:

 

$date = date('d M y', strtotime($date));

 

$date being a date in the 0000-00-00 00:00:00 format.

 

PHP Version 5.2.6

 

solution?

Explicitly set the timezone on your system.

"Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function."

 

I'm not sure what I am supposed to do here, I had a look at the function but I couldn't figure out how I was meant to use it?

 

EDIT: figured it out, put it at the top of my config.php file :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.