Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Post Measurements UTC or Local Time

Marcus Nov 06, 2018 08:59PM GMT

Hello all,
when I post measurements of my station to http://api.openweathermap.org/data/3.0/measurements I wonder whether I have to pass the parameter Time of Measurement "dt" (Unixtime) as UTC or local time.
I was assuming OpenWeatherMap works only with UTC, but when I want to fetch the current weather by ID (http://api.openweathermap.org/data/2.5/weather?id=xx&Appid=) it seems I get the sunset and sunrise as local time.
Thanks for your answers
Marcus

Up 0 rated Down
Pavel Zuykov Nov 07, 2018 07:41PM GMT OpenWeatherMap Agent

Hello Marcus,

Could you please clarify, what city do you requesting? Our API use UTC format in all timestamps

Up 0 rated Down
Marcus Nov 07, 2018 09:29PM GMT
I've checked the code on my end again and I did convert the Unixtime wrong so I was assuming the Unixtime is not in UTC, but actually it is in UTC as it is supposed to be. So I need to report als Unixtime as UTC.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete