tomhollander / PowerwallCompanion

Windows UWP app for monitoring your Tesla Powerwall 2 battery
9 stars 7 forks source link

Daylight saving time issue on the PC version #17

Closed GianGali82 closed 3 months ago

GianGali82 commented 7 months ago

In Europe the DST starts at 3:00 am of the last Sunday of March and ends at 3:00 am of the last Sunday of October. In October the time go back one hour, so while adding this data a "Duplicated key" errors is raised. As a consequence, while exporting data, the file miss all the details between 3:00 am to end of day. One idea could be store the details in the db as UTC time. Thanks!

tomhollander commented 7 months ago

Thanks, I'll look into this. Note I'm not storing any data at all, just pulling it from Tesla's API. It comes in local time so I can't change that easily (I agree it would be more reliable if it were in UTC). But I should be able to fix the bug you mentioned.

tomhollander commented 3 months ago

Should be fixed