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?

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.