I started getting these errors on emoncms running on my raspberry pi today after upgrade to latest version.
The solution is to edit /etc/php5/apache2/php.ini file and look for the date.timezone line. I put mine as defined here http://php.net/manual/en/datetime.configuration.php#ini.date.timezone , restarted apache and all is fine.
hope this helps if anyone gets same error
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
Hi, Getting same errors.
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/emoncms3/Models/input_model.php on line 64
Added following code using " sudo nano /etc/php5/apache2/php.ini"
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone ="Europe/London"
; http://php.net/date.default-latitude
;date.default_latitude = 51.500181
; http://php.net/date.default-longitude
;date.default_longitude = -0.12619
however still getting same code.
Hope you can assist. Cheers
Peter
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
Peter,
you have to remove the semicolumn in front of the date.timezone, just like this:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone ="Europe/London"
You don't need the coordinates, it works without them
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
Thanks for pointer, must remember that in future, must have other issues its still the same when I restart apache2 I get:
pi@raspberrypi ~ $ /etc/init.d/apache2 restart
[....] Restarting web server: apache2/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
This is a bit of a learning curve, just got my raspberry pi and setting up as webserver. I may load wheezy again and start fresh.
Cheers
Peter
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
Hmm I didn't get these errors, you tried to restart apache as sudo, did you?
sudo /etc/init.d/apache2 restart
Also google reveals this solution to the error message you get, give it a try:
http://excid3.com/blog/usrsbinapachectl-line-82-ulimit-open-files-cannot-modify-limit-invalid-argument/
I hope this helps
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
I reinstalled raspberry from scratch e.g. wheezy debian and still got above Warning: strtotime(): in emoncms when testing. Tried above sugestion no luck.
In the end I re-installed apache2 as per guide at http://askubuntu.com/questions/111770/how-reinstall-apache2 which was quite straightforward and it is now working. Can't wait to connect actual monitor and do some testing.
Thanks for your help
Cheers
Peter
Re: Warning: strtotime(): It is not safe to rely on the system's timezone
Happened again on another installation (raspberry pi). Your fix above adding "Europe/London" and removing ; worked.
Thanks
Peter