sensorlogger
sensorlogger copied to clipboard
Set timezone
My Nextcloud (12 stable, Ubuntu 16.04) instance is set to UTC+2.
Expected behavior: sensorloger displays times in UTC+2.
Actual behavior: sensorloger displays times in UTC only.
As this is still an ALPHA release, there are many to dos pending and bugs to fix. One of those todos is called "Timesettings" :-)
:-) totally understood! Just wanted to write it down for future reference... Thanks for all this so far!!
As far as I understand, sensorlogger uses plain php date() to fill in the relevant date and time information for each sensor log report. If the server's php date is UTC, we fill in UTC date.
I guess proper and simplest workflow here would be:
- Always fill in UTC date in the database (with a check, if the server's time is really UTC)
- Use this API: https://github.com/nextcloud/server/blob/master/lib/private/DateTimeZone.php#L55 API to adjust date/time in json sent out to browser.
@alexstocker If that's okay, I can give it a try and implement it.
Thanx @nekromant. I would appreciate. Any contribution welcome!