3

It looks like the output format for dates from the ArcGIS REST API at 10.1 is in ticks.

Has this always been the case?

Can it be changed at the server level or the request level?

Midavalo
30k11 gold badges53 silver badges108 bronze badges
asked Sep 30, 2013 at 20:10
1
  • my experience with flex widget was that each api is going to read the time field as implemented for api. you then apply formatting to the output. widget or other. like... <field name="DATE" alias="PURCHASE DATE" visible="true"> <format dateformat="shortDate"/> Commented Sep 30, 2013 at 21:08

1 Answer 1

5

When you send a query request to ArcGIS Server's REST API, the response will be in JSON and date attributes will be represented as number - 'ticks since the epoch'. I believe this has always been the case.

This gets problematic if the client and the server have some sort of disagreement about when the epoch actually occurs.

To make matters worse, when you issue an identify request for the same features, the results will be formatted as strings.

You cannot change this behavior at the request level. At the server level, you can set a time zone offset for a date field if you enable time awareness in your map document, and then choose a date field for time awareness. However, this will only apply the time zone offset for that one (or two) fields - anything else will not be offset, and values will be assumed to be in UTC (even when they aren't).

answered Sep 30, 2013 at 21:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.