Inform user about mismatches in server and browsee time/timezone
We current have the problem that schedules and other time based controls are based on the server time - inclding the timezone set on the server. By defaultsome systems run on UTC or other timezones that might not be the same as the user.
In https://github.com/ioBroker/ioBroker.js-controller/issues/1198 we added a way to get the server time of the js-controller hosts.
The assumption is that the browser of the user uses the correct timezone and time.
When Admin starts we could request the server times from all hosts and compare them
- with each other (to make sure they are all setup same, else things could become strange)
- with the browser time Show a message to the user if these times and TZs do not match that he knows that he should fix the server timezone to match to the expected timezone.
An idea would be to inform as soon as the times differ >30mins or such
Feature Flag: https://github.com/ioBroker/ioBroker.js-controller/commit/914239469d00114f47ff71d5b3fe2c04679c295d
if it is possible to check a locations time zone, i'd give that precedence over browser settings. Some maintain their iobroker server in greece, turkey and other countries from germany. only if location is not set in iobroker, browser settings should be used. just my thoughts when i read this
This is exactly the challenge for these kind of isssue, so we can only give hints - the user need to decide if it is relevant and if he needs to change something. In fact there are three (different) data:
- The server Time
- The location of "the installation" (if the user had set it at all or correct and such) according to config
- The time of the "client/browser" used to operate iobroker
All three could be different, so yes ok we can do a hint f they do not match at all ...
I think 9x% of the cases they should match. The edge case is "I run iobroker in my summerhouse in italy but living in germany and configure it from germany - or from vacation in turkey" ;-) Honestly ... then the user sees the info and all is fine.
The cases where we had isues several times is that just linux systems run on default UTC and people wonder why their schedules are off 1-2h to what they wanted ... SO yes The magic is to make that message useful for the user.
We could also only bring the info when the server time has no timezone set (means no offset?) and see if this is sufficient ...
No idea whats the best way :-(