How to fix the php error It is not safe to rely on the system’s timezone settings

By Chris on February 27, 2015 in php
0
0

Error message” Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings…

This is due to a php version upgrade on the server and can be fixed by putting this line at the top of the page:

<?php date_default_timezone_set(‘Europe/London’);?>

Other timezones can be found here: http://www.php.net/manual/en/timezones.php

Alternatively you can put this line in your php.ini file: ‘date.timezone = “Europe/London”;’

About the Author

ChrisView all posts by Chris >

0 Comments

Leave a reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.