API - get data points - timezone problem

11 comments started 2024-04-01 last 2024-05-11
APIsHome Automation
Z
#1 Zebsmattz

Hi,

I have been using the 'get data points' API from python.
The behaviour regarding timezone seems to have changed recently.
All the datetime values end in "Z" which mean they should be in UTC, and they used to be, but now they are instead in my local timezone.
I have a stored file (from when it was working) with a response for: 2023-10-08
This date is inside DST in the UK.
Before the change, the first result had time: 2023-10-07T23:00:40Z - which is midnight 8/10/2023, UK local time.
Now, the first result has time: 2023-10-08T00:00:40Z
All the figures are the same values so it is the same data, it's just the time is different.

This looks like a bug.
Does anyone know how I would report this to Givenergy, please?

Regards,
Zebs

D
#2 DD

Zebsmattz you can report bugs through 'leave feedback' under help on the app. It's also on the portal, though I can't remember exactly where.

#3 nophead

How is 23:00:40 midnight in October? We were on GMT then.

V
#4 Vestas

nophead Maybe on your planet we were, not in the rest of the UK though 🙂

#5 nophead

Sorry, my mistake, but if we were on BST then wouldn't it be 22:00:40 in GMT?

V
#6 Vestas

nophead No. You have a problem with timezones/don't understand the thread.

All GE times are in UTC (or were anyway).

2200 in UTC is 2200 local UK time in wintertime and 2300 local UK time in summertime.

Z
#7 Zebsmattz

Yes as it's in DST then at 7/10/2023 23:00 UTC (or "Z" Zulu time) our UK wall clock shows 1 hour ahead - which is "local time", which is midnight the next day.
It's all very confusing, hence why APIs tend to stick to UTC and leave all the timezone rubbish to the consuming application.

Z
#8 Zebsmattz

I just tried it again for today
First time in response is: "time": "2024-04-01T00:02:07Z",
Last time in response is: "time": "2024-04-01T19:59:21Z",
I will try to report a bug in the portal/app

Z
#9 Zebsmattz

OK I left a bug report, it was easy enough to find - will see if they respond.

Z
#10 Zebsmattz

Unsurprisingly, they have completely ignored it

Z
#11 Zebsmattz

They now seem to have fixed it
PS They didn't tell me or anything, on my feedback - I just noticed this evening