jantenhove / GoodWeLogger

ESP8266 based logger for GoodWe inverters. Can upload to pvoutput and publishes MQTT topics
GNU General Public License v3.0
96 stars 24 forks source link

Daylight saving time error in PVoutput posts #18

Closed bram2202 closed 4 years ago

bram2202 commented 5 years ago

After the change in DST the posts to PVoutput keeps posting the old datetime.

For example: last weekend DST ended, correct datetime for me is UTC+1. But PVoutput receives UTC+2, and thereby show the data in the live chart 1 hour in the future. Screenshot taken at 11:30

pv_output_1130

Workaround probably is to reset the board, but you need to do this before/after power is generated, otherwise PVoutput wil receive multiple data for the same datetime

jantenhove commented 5 years ago

Time zone settings are hardcoded for now: https://github.com/jantenhove/GoodWeLogger/blob/4a638a97256bc0c7d88c07dab83a9c1134987bc2/Settings.example.h#L38 PVoutput only accepts local time instead of UTC (or any other standard). Maybe there is a library/web service that can return the time offset based on a region.

bram2202 commented 5 years ago

Ok, so i need to change TIMEZONE every 6 months?

jantenhove commented 5 years ago

Yes, or ask pvoutput to support UTC uploads. They already know the region you're in so they can convert the time more easily.

jantenhove commented 5 years ago

When you donate to pvoutput there is a 'Adjust Time' setting for each of your systems to correct for systems that don't support DST. See: https://pvoutput.org/help.html#live-settings-time-adj