Closed probonopd closed 7 years ago
This is needed e.g., for wake up timers which can be set from the app.
Woulnd't it be easier to use https://nodemcu.readthedocs.io/en/master/en/modules/sntp/
Yes, if you assume there is Internet connectivity.
Sorry for the noise, this was a js library. I'll try https://github.com/gmag11/NtpClient and send a PR.
I have added NTP support and now send the time with the config request. I am testing with the All4Hue android app and it does not warning about this anymore. For the timezone, we need to send a block like:
"timezone": "Europe/London",
with the config. Since the time is sent as utc localtime, we could also hardcode the timezone for now.
Apps like All4Hue can set the timezone on the bridge and once we have #53 fixed, we can store it and use it to correct the localtime. Does that make sense?
Yes, PRs highly appreciated.
The original bridge has real time clock information and knows about timezones, allowing for timed events. Maybe we could use https://github.com/JChristensen/Timezone to do the same.