AnsweredAssumed Answered

How to work with Time Zones?

Question asked by sjacksonesriaustralia-com-au-esridist Employee on Jun 1, 2015
Latest reply on Sep 10, 2015 by Georgie.Cassar

I have a basic app built using the 3.13 Esri Javascript API, very close to this sample.


I originally published the temporal layer with the correct time zone for the data.


Publishing this to an ArcGIS for Server 10.3 instance, I can see that this has flowed through to the REST endpoint:


The Time Extent of the time data, is 5am to 10am on 27/04/2015, AUS EST.

So the above UTC time is technically correct.


Adding this layer to my app, and using the standard time widget provided in the Esri JS API, I have some issues.


Viewing the app here in Melbourne (same time zone as service), everything is good.

Can see the labels are correctly populated from the service, spanning 5am to 10am.



Howeverer, viewing the app from a machine in a different time zone, and it seems to use their local time zone:




I saw some other posts where they mention to do things like publish in UTC and add/minus the relevant number of hours? 

Is that the right answer?  What is the best way of dealing with time zones when publishing to Server and having an audience that will be coming from different time zones?  Is there a parameter I am missing in the Javascript properties of my service to enforce the Server timezone to all clients?  Any info on best practice would be really useful.