rdmenezes / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

minor problem: set (ask? for) the timezone #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
when i run with php.ini  set to log E_WARNING i see this error:

 PHP Warning:  date(): 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 'Europe/Paris' for 'WEST/1.0/DST' instead in /home/www/measureit-108/php/data-input.php on line 61

i "fix" this by adding 

date_default_timezone_set('Europe/Lisbon');

in the top of class.db.php ... but maybe a better way would be a setting for 
the sensor, as one might have several houses in different timezones and wanted 
to monitor then just in one place.

If not, maybe a note in the install to change/tune the timezone

Original issue reported on code.google.com by dmotale...@gmail.com on 23 Aug 2011 at 4:06

GoogleCodeExporter commented 9 years ago
I am not a friend of change time zones on a server. I do not know witch other 
services run on it. GMT the default time zone on each linux is the best 
solution so I add a setting in the measureit admin where the user can set the 
difference between his local time and the GMT time. Every sensor can have his 
own timezone. The php warnings are blocked now.

These changes are available in the next version or you can check out the 
sources with svn.

Thank you

Original comment by lalelu...@gmail.com on 24 Dec 2011 at 11:15