dymaptic

Managing Time Zones in Infomaptic: Using Date.ConvertTimeZone and Date.ToUTC

Written by Chantelle Campbell | Jan 19, 2022 6:15:00 PM

Dates in ArcGIS services are often time zone naive, meaning that the time zone is not specified. Infomaptic assumes Coordinated Universal Time (UTC) for such dates, as do most hosted feature services. To change the time zone, you can use the Date.ConvertTimeZone expression followed by the desired time zone.

For Example: 

Date.ConvertTimeZone(data.Date.value, 'America/Los_Angeles')
Date.ConvertTimezone(Date("2022-10-21T19:30:59.3780063+00:00"), "America/Los_Angeles"); => 2022-10-21T12:30:59.3780063+00:00
The function, ConvertTimeZone, has the following parameters:

Likewise, if the date does have timezone information, or you have already set it, you can use the ToUtc function to convert it back to UTC. For more details, check out the docs for ToUTC or ConvertTimeZone.

Check out the video below for a detailed review!