Azure Maps byCoordinates api call GMT issue

Murphy, Ciaran 5 Reputation points
2025-04-04T08:18:32.21+00:00

Hi there,

I'm leveraging the timezone/byCoordinates api call to convert lat and long coordinates to a time zone.

I've ran across an issue when hitting the api call with coordinates located in Ireland 53.3498,-6.2603. GMT is returned with a daylight saving time of -1:00:00 and IST is returned with daylightSavingTime of 00:00:00. My expectation was that GMT was going to be a daylightSavings of 00:00:00.

When hitting the api with coordinates of London (51.507351,-0.12775) the api returns as I expected. GMT has a daylight of 00:00:00 and BST has a daylightSavings of 01:00:00

Is this the expected behavior of the api call byCoordinates?

Thanks

Ciaran

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
809 questions
{count} vote

1 answer

Sort by: Most helpful
  1. IoTGirl 3,616 Reputation points Microsoft Employee
    2025-04-24T19:51:50.7233333+00:00

    Hi @Murphy, Ciaran

    I have spoken with the PM Owner and there is agreement that while it looks odd, it is not wrong. They will review the back-end data around this, but these values do work correctly in the calculation in relation to UTC. Let me use another distant time zone, mine, to illustrate. Let's focus on the "Time Transitions" section for PDT & PST

    User's image

    You can see that for ANY Time zone calculation you need BOTH "StandardOffset" and "DaylightSavings" modifiers to calculate the correct difference to UTC. You can think of the "DaylightSavings" as the modifier needed to the "StandardOffset" and in all cases both will apply making consuming these very simple. As our data has the Standard Offset for IST that is not Zero, then the Relative Time zone will need that taken into account.

    We do agree with you that this looks odd to add 1 then subtract 1 to get the GMT value but it equates to zero and should work. As I said above, they are going to look at the back end data to see if there is a change we can make to the IST definition to have it look more like you would expect but the numbers will work for proper UTC to local time calculations as is, so should you write your code to use these and we do change the data, your code will still work.

    Sincerely,

    IoTGirl

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.