"time_utc" is local time

The Netatmo API is a set of webservices allowing developers and third parties to access Netatmo device's data.
Post Reply
GreenRover
Posts: 1
Joined: 02 Oct 2015, 12:33

"time_utc" is local time

Post by GreenRover » 02 Oct 2015, 12:51

Hello, i tryed this both api calls:
https://dev.netatmo.com/doc/methods/getstationsdata
https://dev.netatmo.com/doc/methods/getthermostatsdata
https://dev.netatmo.com/doc/methods/devicelist

All contain a dashboard_data.time_utc field.
But this fields contain a unix timestamp of my local timezone (Europe/Zuerich).

Here a screen shot of the netatmo dashbaord:
netatmo_screen.png
netatmo_screen.png (12.21 KiB) Viewed 293 times
The dashboard timezone is: Europe/Zuerich

and here the api result:
Auswahl_031.jpg
Auswahl_031.jpg (80.58 KiB) Viewed 293 times
The timestamp in field dashboard_data.time_utc is not UTC but Europe/Zuerich.

Changing the dashboard time zone settings makes no different to me.

How can i get real UTC timestamps from API?

trosenblatt
Posts: 233
Joined: 18 Sep 2012, 12:18

Re: "time_utc" is local time

Post by trosenblatt » 06 Oct 2015, 17:48

Hello GreenRover,

TImestamps are ALWAYS in UTC. That the definition of timestamp (number of seconds since 01 Jan 1970 UTC)
Regards,
Thomas Rosenblatt, Netatmo Team.

manfredst
Posts: 2
Joined: 01 Dec 2015, 17:50

Re: "time_utc" is local time

Post by manfredst » 01 Dec 2015, 21:56

Hi, I got the same behavior.
Timestamps are NOT utc.
They are in my local time (vienna = utc+1)
my httpget was at 12-01-2015 21:36
and in the result was :
-----------------------
"module_name":"Aussenmodul",
"type":"NAModule1",
"firmware":43,
"last_message":1449001623, <= 12-01-2015 21:27
"last_seen":1449001578, <= 12-01-2015 21:26
"rf_status":77,
"battery_vp":6064,
"dashboard_data":{
"time_utc":1449001578, <= 12-01-2015 21:26
"Temperature":8.8,
"temp_trend":"stable",
"Humidity":90,
"date_max_temp":1448967229, <= 12-01-2015 11:53
"date_min_temp":1448999169, <= 12-01-2015 20:46
"min_temp":8.8,
"max_temp":14.7},
-------------------------------
all the timestamps fit with my localtime

BR
Manfred

Post Reply

Return to “Netatmo API”