goecharger / go-eCharger-API-v2

New API specification for V3 and V4 go-eCharger
92 stars 20 forks source link

Wrong time values? #177

Open enso-media opened 1 year ago

enso-media commented 1 year ago

Can anyone explain values like lccfi, lccfc and lcctc? Based on the documentation i expected those parameters to be timestamps that can be used to get the start and stop times of the latest charge or state change. Its documented as "ms", but the values i get from the API makes no sense at all. They dont change after a charge, so its not a difference. Also i get values like "179773240" which would be like 2 days. Its also not a valid unix like timestamp.

0xFEEDC0DE64 commented 1 year ago

those timestamp api keys take the reboot time (api key rbt).

the idea was that you subtract rbt - lccfi for example, and you get a relative timespan when the event happended or will happen.

when you change the utc or local time, or when NTP time sync happens, or you switch timezones, then the reboot time is not affected as its just the time in milliseconds since the device was powered on, it is a monotonic clock, unlike the utc clock for example.

karliwalti commented 5 months ago

Is this also true for lmsc, inva, and lpsc ?