Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for preferredTimeReference property on Feature Services #897

Open
chris-fox opened this issue Oct 3, 2022 · 3 comments
Open
Assignees

Comments

@chris-fox
Copy link
Collaborator

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.

image

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)

@jmhauck
Copy link
Collaborator

jmhauck commented Oct 11, 2022

@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.

@jmhauck
Copy link
Collaborator

jmhauck commented Oct 12, 2022

Wasn't planning to merge until after they support IANA unless you want me to.

@chris-fox
Copy link
Collaborator Author

No, let's leave it out until we are ready to do the full support. I removed from the 10.3 project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants