excaliburpartners / OmniLinkBridge

MQTT bridge, web service API, time sync, and logging for HAI/Leviton OmniPro II controllers
GNU General Public License v3.0
41 stars 24 forks source link

Application time does not match actual time #51

Closed mdedonato closed 2 years ago

mdedonato commented 2 years ago

Sometime in the last few builds, I noticed that the time my omnipro was being synced to was off by 4 hours. I also noticed that all of the log file times are offset by the same amount. Did someone change something to do with time zones recently? I am using the latest version, but noticed the problem about a week ago.

rwagoner commented 2 years ago

OmniLink Bridge uses the local system time. How are you running it? Home Assistant? Docker?

mdedonato commented 2 years ago

I'm using it with home assistant via the addon. The odd part is that only this addon seems to have the wrong time stamp. The system time is correct, and all other add-ons have the correct time in their logs.

mdedonato commented 2 years ago

I am in the eastern time zone, so it looks like everything is being set to utc time.

rwagoner commented 2 years ago

I was able to replicate this. Strangely the TZ environment variable was not available in the container until I would exec in to a bash shell. Switching over to the S6 overlay used in the hassio-addons example seems to have resolved it. Please update to version 1.1.14.1 of the add-on.

mdedonato commented 2 years ago

Thanks! I will give it a try

mdedonato commented 2 years ago

That worked, Thank you for the quick fix, and thank you for developing this app. It works great!