Select to view content in your preferred language

Convert time for Static Map

656
4
12-06-2023 11:50 AM
GarthHoxsie-Quinn
Occasional Contributor

Afternoon all, 

While RI is not in the path of the upcoming eclipse, we are close enough to maybe have a unique show. That being said, we are putting together some maps and all the data is in UTC. As these are going to be static maps, I want to be able to show the time associated with Umbra location in EDT vs UTC as I am not sure a lot of the general public will understand.

GarthHoxsieQuinn_0-1701891859438.png

That being said, I feel like I have tried multiple python equations I have seen posted to no avail. Python and Arcade are not my strongest areas so I appreciate any assistance that can be provided.

 

0 Kudos
4 Replies
KenBuja
MVP Esteemed Contributor

If the field UTCTime is a text field, here's one way to convert it to Eastern Time for April 8, 2024

var UTCTimeSplit = Split($feature.UTCTime,':');
var theDate = Date(2024,3,8,UTCTimeSplit[0],UTCTimeSplit[1],UTCTimeSplit[2],0,'UTC');
return Text(ChangeTimeZone(theDate, 'America/New_York'),"h:mm:ss A");

 

Robert_LeClair
Esri Notable Contributor

There is a GREAT GP tool called Convert Time Zone (Data Management) that does all the field calculations for you.  I tested it with some sample data and it worked well.  The parameters allow for Daylight Saving and Standard Time parameters as well.  Let me know how it goes for you!

GarthHoxsie-Quinn
Occasional Contributor

Thanks @KenBuja , @DavidPike , and @Robert_LeClair , I will check out these options.

0 Kudos