Skip to main content

Notifications

Dynamics 365 Community / Forums / Field Service forum / Setting work hour temp...
Field Service forum
Unanswered

Setting work hour template automatically - Issue getting time zone

Posted on by 2
Hi,
 
We have a requirement to set the work hour template at a contact level rather than at an account level.
 
The plan was to call Azure Maps and pass thrugh the contacts address coordinates and get back the time zone then do a lookup to the time zone definitions table like in this excellent article https://www.inogic.com/blog/2022/11/set-timezone-format-field-based-on-account-location-in-microsoft-dynamics-365/#respond. The issue is the (Generic) time zone doesnt apear to be in the time zone definitions table, in the article they are using bing maps but as that is to be discontinued I need to use Azure Maps.
 
Here is an example of a response for a property in Ireland, I cant find anyway to link this back into Dynamics. 
 

{

    "Version": "2024a",

    "ReferenceUtcTimestamp": "2024-08-12T15:31:02.6956167Z",

    "TimeZones": [

        {

            "Id": "Europe/Dublin",

            "Names": {

                "ISO6391LanguageCode": "en",

                "Generic": "Ireland Time",

                "Standard": "Greenwich Mean Time",

                "Daylight": "Irish Standard Time"

            },

            "ReferenceTime": {

                "Tag": "IST",

                "StandardOffset": "01:00:00",

                "DaylightSavings": "00:00:00",

                "WallTime": "2024-08-12T16:31:02.6956167+01:00",

                "PosixTzValidYear": 2024,

                "PosixTz": "GMT-1IST,M3.5.0/1,M10.4.0",

                "Sunrise": "2024-08-12T06:00:37.7278597+01:00",

                "Sunset": "2024-08-12T21:00:53.0342742+01:00"

            }

        }

    ]

}

Any help would be apreciated. 

Thanks
  • Suggested answer
    Sachin Jadhav Profile Picture
    Sachin Jadhav 27 on at
    Setting work hour template automatically - Issue getting time zone
    Is the API response returning "Standard" timezone name as well and are you able to extract it?
    If yes, then may be try searching timezonedefinition using that standard name.
     
    Here is what i saw on one of the sample responses.
     
     
    The timezone cane be looked up using standard name like this.
     
     

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans