Geolocation and timezones with wrong countries

  • 1
  • Problem
  • Updated 2 years ago
Hello,

I'm using WU api to fetch weather forecasts based on coordinates, and at the same time I fetch the timezone of that coordinate and return the correct hours to the client.
However, this particular coordinate is not working as intended: 42.077201843262,-8.4819002151489 (I belive this is happening in similar coordinates).

This coordinate refers to a location in Portugal, but the Weather Forecast is from the nearest station which is in Spain, and that's fine, but the timezone also referes to that station, and that is no correct! The timezone should be relative to the coordinates.

Thank you for you help!
Photo of Tomiworld

Tomiworld

  • 4 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Ravi Yadav

Ravi Yadav

  • 82 Posts
  • 9 Reply Likes
Can you share the request URL you are constructing to make the API call? 
Photo of Tomiworld

Tomiworld

  • 4 Posts
  • 0 Reply Likes
Photo of Ravi Yadav

Ravi Yadav

  • 82 Posts
  • 9 Reply Likes
That is the intended behaviour. Wunderground API returns timezone of the weather station which is sending the data. 
Photo of Tomiworld

Tomiworld

  • 4 Posts
  • 0 Reply Likes
And is there any reason for the country_iso3166 being  the same both in the observation_location and display_location? The country field is different in both observation_location and display_location.
I would like to use your service to check the timezone, and maybe a fallback service if something doesn't work, like now. But I'm failing to create a validation tool based on the information received.
Photo of Ravi Yadav

Ravi Yadav

  • 82 Posts
  • 9 Reply Likes
This appears to be a bug. Thanks for pointing it out. I will forward this to the API team. 
Photo of Tomiworld

Tomiworld

  • 4 Posts
  • 0 Reply Likes
OK. Please let me know when it is fixed!