Readings data UTC offset

The documentation lists the data returned for a resource readings to be a list of [UTC timestamp, reading] but it appears that the timestamp is actually not in UTC but adjusted by the offset you pass in the request.

For instance if I request with from=2022-08-15T01:00:00, to=2022-08-15T04:00:00, period=PT1H, offset=-60 I get:

[(1660525200, 0.238), (1660528800, 0.229), (1660532400, 0.199), (1660536000, 0.137)]

If I request with from=2022-08-15T00:00:00, to=2022-08-15T03:00:00, period=PT1H, offset=0 (same times, different offset) I get:

[(1660521600, 0.238), (1660525200, 0.229), (1660528800, 0.199), (1660532400, 0.137)]

You can see that the readings are the same (as they should be for the same times requested) but the timestamps are different, which they shouldn't be if they are always in UTC. In fact they differ by 3600 (the offset in seconds).

Is this an error in the API or an error in the documentation?

Sign In or Register to comment.