Handling time for layers that cross multiple time zones?

582
3
Jump to solution
01-12-2023 12:28 PM
Labels (3)
RandyMcGregor3
Occasional Contributor III

I have a feature class with points all over North America. Is there a way to 'tell' ArcGIS Pro (and AGOL) what the time zone is for each point, or can you only set a single time zone for a feature class?

Thank you,

Randy McGregor

0 Kudos
1 Solution

Accepted Solutions
DavidSolari
Occasional Contributor III

If you store your temporal data adjusted to UTC then you can either convert it to the user's current time (some applications will do this automatically, otherwise you can use a conversion function, such as Arcade's "ToLocal"). If you need to store the data in the local time zone of capture, you can create a second field, then combine the UTC time with a spatial join to time zone polygons and apply the appropriate offset. Don't try to be clever with hardcoded offsets, time zones are subject to change at any time so you'll need a copy of the time zone boundaries relevant to your date range. For live data going forward you can use the World Time Zones service from the Living Atlas, for historical data you'll have to track down historical zones. Handling time zones outside of your current locale is one of the toughest computer problems out there so good luck!

View solution in original post

0 Kudos
3 Replies
DavidSolari
Occasional Contributor III

If you store your temporal data adjusted to UTC then you can either convert it to the user's current time (some applications will do this automatically, otherwise you can use a conversion function, such as Arcade's "ToLocal"). If you need to store the data in the local time zone of capture, you can create a second field, then combine the UTC time with a spatial join to time zone polygons and apply the appropriate offset. Don't try to be clever with hardcoded offsets, time zones are subject to change at any time so you'll need a copy of the time zone boundaries relevant to your date range. For live data going forward you can use the World Time Zones service from the Living Atlas, for historical data you'll have to track down historical zones. Handling time zones outside of your current locale is one of the toughest computer problems out there so good luck!

0 Kudos
RandyMcGregor3
Occasional Contributor III

Thank you David.

These solutions are probably what is necessary and I appreciate the information, but I don't understand why there is no option to simply use the date and/or time as it is with no adjustment. The data is collected when it's collected, local time. Anyone looking at the data knows this. It's collected between normal working ours (8 to 5 or so) and seeing a time of 2:00 am for example would make absolutely no sense. I could convert to text, but then the dates wouldn't work in a chart. Usually, we go down to the day level and using 'central US' time zone for all of North America will almost always prevent the time from being off far enough to change the day.

Thank you again for you input. If I apply these and they work, I'll give credit for the solution. This would be a good Arcade challenge. I think Arcade can even to the spatial overlay? I'll look into it...

0 Kudos
RandyMcGregor3
Occasional Contributor III

I think ToLocal does the trick, assuming your date values are in UTC, which they would be if no time zone were applied to the layer, which is what should be the case for layers with data from more than one time zone. 

0 Kudos