ArcGIS Blog

Announcements

ArcGIS Online

ArcGIS Online Map Viewer supports date-time data off multiple time zones in a single layer

By Tanu Hoque and Gary MacDougall and Russell Brennan

If you ever shared layers containing date/time attributes as map or feature services, you for sure know that date/time values are always passed around in UTC epoch values. This is per ArcGIS REST API specifications. In order to make sure date/time values are processed correctly, it is required that you set a time zone for your service while authoring. This time zone gets applied to all date attributes for all layers in this service.

How date/time values are passed around and displayed on web clients.

The problem:

This can be a big limitation if you have use cases where data comes from multiple time zones such as traffic incidents, summer meal programs, etc. that require date/time values be stored and displayed in their respective time zones instead of your device time zone.

In addition, the dependencies on two different time zone conversion libraries by ArcGIS enterprise services and JavaScript made date/time values show up incorrectly on web maps in some instances especially with historic dataset.

A solution: Unknown time zone

We understand the right fix for this is to store date/time values with time zone offsets, and pass around with time zone offsets. And getting there needs time.

In the meantime, while we are working on providing time zone offsets in our information model, we introduced a new time zone named Unknown in enterprise map and feature services in 10.9 release. This allows you as an author to tell both service and the client app to not perform any time zone conversions. To put that another way, when a query request comes in map/feature service it will not transform date/time values to UTC before passing in a query response. When a client app such as Map Viewer or ArcGIS Pro display these data, it will not assume they are in UTC and therefore will not convert that to any time zone. In short, when a service has its time zone set to Unknown, date/time values are passed around AS-IS without any time zone conversion by either the client or server.

 

Date/time values are passed around AS-IS when service's time zone is set to Unknown.

How?

To set a service time zone to Unknown, here is what you need to do:

  • After publishing a map or feature service in your enterprise portal (or standalone server), go to the server Manager site. Find your service and click the pencil icon to edit the service.
  • Switch to the Parameters tab, select Unknown from the Time Zone drop down.
  • Click Save and Restart.
  • Consume your service in ArcGIS Pro 2.7 or newer, in new ArcGIS Online Map Viewer (the classic Map Viewer doesn’t support this), or ArcGIS API for JavaScript 4.21 or later.
    • if you try to work with it with an older client feature service return error.

 

Limitations:

  • As of the publishing of this blog, neither Map Viewer nor ArcGIS API for JavaScript support editing when a feature service has Unknown time zone
    • ArcGIS Pro 2.7 or later full supports unknown time zone including editing via a feature service.
  • Unknown time zone is only supported in services you publish from ArcGIS Pro
  • Hosted feature services don’t support this.
  • Since date/time values are passed around without any time reference, these values should not be compared with each other.

Share this article

Subscribe
Notify of
2 Comments
Oldest
Newest
Inline Feedbacks
View all comments