Select to view content in your preferred language

Specify TimeZone for popups/attributes in arcgisonline maps

20580
34
04-08-2014 07:19 AM
AshakaThakore1
Emerging Contributor
I have created a map on our arcgisonline account... It has layer which has some attributes of the date-type.... When I click on any point of that layer, it popups the window with attributes, now all the date-time values in that popup are displayed in PST(Or some other timezone).. How can I set it to display date-time values in timezone - EST?
How do I specify timezone in ArcGIS Online?


thanks
Tags (2)
34 Replies
MikeMinami
Esri Notable Contributor

I believe the time zone property affects the layer as a whole.

You can optionally enable time on the layer based on an individual field, which allows the features to display according to their time when you draw features base on their time.

Mike

0 Kudos
DianaZalivchaya1
Deactivated User

Hi Mike,

I have the same issue with time, it displays 4 hours behind in AGOL. I changed the time zone in Arc Map but it doesn't change anything in my web map. However I see the changes in map server.. Any ideas? THANK YOU!

AGOL:

Arc Map:

0 Kudos
MikeMinami
Esri Notable Contributor

Where is this service running (hosted or your own server) and did you publish the service with the time zone set?

Without any time zone configuration, ArcGIS Online assumes all time is stored in UTC. Thus, when displayed in the Map Viewer of ArcGIS Online, time values will get adjusted based on your offset from UTC. To avoid this, you need to publish data (either hosted or to on premises portals) with the appropriate time zone or ensure time values are in UTC.

If you have published to your local server and you're consuming the service in ArcMap, ArcMap doesn't make the same assumption about the time zone and just displays the value stored without offset.

Hope this helps,

Mike

0 Kudos
DianaZalivchaya1
Deactivated User

Thank you Mike! My mistake was that I was publishing map service. It worked when I published it as a feature server

Thanks

0 Kudos
MikeMinami
Esri Notable Contributor

Map service or feature service, that really shouldn't make a difference. Perhaps the second time when you published the feature service, you had set the time zone before publishing?

0 Kudos
DianaZalivchaya1
Deactivated User

Yes. The other time I was overwriting the map service after changing the time zone

0 Kudos
AshakaThakore1
Emerging Contributor
Yes, this is the web browser shifting time from UTC. Are you 4 hours from UTC?

In ArcMap, you can set the timezone for a layer from the Layer Properties dialog, Time tab.

Mike


we are on  - USA Eastern time -New york time
Based on DST, its UTC - 4 or 5  hrs
0 Kudos
AshakaThakore1
Emerging Contributor
i found solution from esri support - to convert date values into text

I found other solution - i create a view in that , convert my date-time from EST to GMT/UTC and then publish it since ARcgis online expects it in GMT/UTC
0 Kudos
MargaretM
Occasional Contributor

Just saw a similar post about Time issues elsewhere and thought I'd throw this out there.  We had a similar problem with our Parcel data (sale dates) being shown as the wrong date and time. The fix for us was to go to ArcMap (10.2.2) to the Time tab in Layer Properties and enable Time.  Select the appropriate field for your date/time value and then set your local Time Zone.  Then when you publish to AGOL, you'll have the correct date and time zone.

Hope this helps.


0 Kudos
CarlinAndrus
Occasional Contributor

I found these suggestions for formatting dates to display correctly in AGOL:

Work with fields—ArcGIS Online Help | ArcGIS

To account for the UTC-to-local-time-zone conversion, here are a few tips:

  • If you need to enter your current date and time, use one of the time functions below, as these functions always return UTC time.  CURRENT_DATE(), CURRENT_TIME(), or CURRENT_TIMESTAMP()
  • If you are entering a date without a time component, add 12 hours to the date. For example, instead of entering '5/27/2014', enter '5/27/2014 12:00PM' or '5/27/2014 12:00'. The reason this offset is needed is that when a date is entered without a time component, it is entered as midnight on that date (5/27/2014 is converted to 5/27/2014 00:00:00), and when it is displayed in your local time zone, hours are added or subtracted. For example, if you are in PST and enter 5/27/2014, it will display as 5/26/2014 (seven hours subtracted from midnight on the 27th).
  • If you are entering a date with a time component, apply your time zone offset to the time. For example, if you need to enter 5/27/2014 12PM PST, apply the seven-hour difference and enter '5/27/2014 7:00PM'. To find your time zone offset, you can search the web using a search phrase such as UTC time difference calculator.
  • To view the contents of your date field in UTC time, you can add a string field to your table and calculate it to be equal to your date field. The date will be converted to a string without the time zone offset. This string will also contain milliseconds.
0 Kudos