You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ArcGIS Online and Enterprise services all dates are stored in UTC. In web clients these dates are always converted to local time based on the browser timezone. In ArcGIS Pro this doesn't happen automatically, it will display in UTC by default. A new option was added to ArcGIS Online and Enterprise hosted services called preferredTimeReference that ArcGIS Pro honors when display date fields. This blog post discusses setting this option:
I would like to propose 2 things, we support the ability to specify this timezone at the root of the properties object of a feature service template like below. All layers in a service need to have the same preferredTimeReference and you specify it at the service level via updateDefinition and then it is pushed to all the layers in the service. If we find this property set on a layer and not null, we should pull it to the root of the properties upon creation of the template.
During deployment we need to apply this in an updateDefinition on the service after all the layers are added.
In addition, I would like to replace the preferredTimeReference value with a variable that we can swap out at runtime during deployment:
"preferredTimeReference": {{localTimeZone}}
This variable should be replaced with the local time zone of the browser that is deploying the solution. From the blog above the list of valid time zones comes from this Microsoft topic:
@chris-fox When IANA is supported we can make any updates here. This currently just looks at the offset and grabs the first name from the Microsoft list for that offset.
In ArcGIS Online and Enterprise services all dates are stored in UTC. In web clients these dates are always converted to local time based on the browser timezone. In ArcGIS Pro this doesn't happen automatically, it will display in UTC by default. A new option was added to ArcGIS Online and Enterprise hosted services called preferredTimeReference that ArcGIS Pro honors when display date fields. This blog post discusses setting this option:
https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/working-with-agol-feature-services-date-time-attributes-in-non-utc-time-zone-in-arcgis-pro-2-7.
I would like to propose 2 things, we support the ability to specify this timezone at the root of the properties object of a feature service template like below. All layers in a service need to have the same preferredTimeReference and you specify it at the service level via updateDefinition and then it is pushed to all the layers in the service. If we find this property set on a layer and not null, we should pull it to the root of the properties upon creation of the template.
During deployment we need to apply this in an updateDefinition on the service after all the layers are added.
In addition, I would like to replace the preferredTimeReference value with a variable that we can swap out at runtime during deployment:
"preferredTimeReference": {{localTimeZone}}
This variable should be replaced with the local time zone of the browser that is deploying the solution. From the blog above the list of valid time zones comes from this Microsoft topic:
https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)
The text was updated successfully, but these errors were encountered: