Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meter timestamp / daylight saving time #43

Closed
ArnieO opened this issue Feb 26, 2020 · 1 comment
Closed

Meter timestamp / daylight saving time #43

ArnieO opened this issue Feb 26, 2020 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ArnieO
Copy link
Contributor

ArnieO commented Feb 26, 2020

From my Kamstrup meter I receive at 11:19 the timestamp 1582715950 in MQTT, which according to https://time.is/Unix_time_converter translates to:
Wed Feb 26 2020 12:19:10 UTC+0100 (Central European Standard Time)

Which seems to be 1 hour off.

According to https://github.com/gskjold/AmsToMqttBridge/blob/master/doc/NVE_Info_kunder_HANgrensesnitt.pdf
the timestamp shall be local time in Norway, taking into account daylight saving time (DST).
But the timestamp from my meter seems to be at DST already?

  • Is the MQTT timestamp raw data from the meter?
  • Do users of other meters / meter brands see the same?
@gskjold
Copy link
Member

gskjold commented Feb 26, 2020

The meters does not send data as unixtime, but as a set of numbers representing the date and time in a predefined timezone. This is in turn converted to unixtime in the code, but does not take timezone into account. In effect the date and time from the meter is interpreted as UTC time which is incorrect.

@gskjold gskjold added the bug Something isn't working label Feb 26, 2020
@gskjold gskjold added this to the v1.2.0 milestone Feb 26, 2020
@gskjold gskjold closed this as completed Mar 8, 2020
@gskjold gskjold self-assigned this Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants