tjhilder Posted July 24, 2009 Share Posted July 24, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/167220-solved-strtotime-error-with-0000-00-00-000000-format/ Share on other sites More sharing options...
xtopolis Posted July 24, 2009 Share Posted July 24, 2009 Explicitly set the timezone on your system. "Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function." Quote Link to comment https://forums.phpfreaks.com/topic/167220-solved-strtotime-error-with-0000-00-00-000000-format/#findComment-881686 Share on other sites More sharing options...
tjhilder Posted July 24, 2009 Author Share Posted July 24, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/167220-solved-strtotime-error-with-0000-00-00-000000-format/#findComment-881687 Share on other sites More sharing options...
xtopolis Posted July 24, 2009 Share Posted July 24, 2009 Can also set it in php.ini Quote Link to comment https://forums.phpfreaks.com/topic/167220-solved-strtotime-error-with-0000-00-00-000000-format/#findComment-881689 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.