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 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 ( it seems I get the sunset and sunrise as local time.
Thanks for your answers

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)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found