FKW9 / esp-smartmeter-netznoe

Read Smartmeter Data and store to SD Card or publish to Graphite
MIT License
14 stars 4 forks source link

time conversion does not take daylight saving time into account #4

Closed FKW9 closed 1 year ago

FKW9 commented 2 years ago

The Problem: We receive the correct timestamp from the Smartmeter, which already considers time zones, but the function mktime() always assumes a UTC time. That is why we have to substract 1 or 2 hours depending on summer/winter time.

Possible Solutions:

When using the last approach, consider that each metric will have a slight delay and not the same timestamp.

https://github.com/mitsubishievo99/esp-smartmeter-netznoe/blob/6b2d2c7ca1f2359c54c7edd122f97d3adf947f2f/src/main.cpp#L146

FKW9 commented 1 year ago

just using -1