The first timer on the Stack Extension.
I am working with ArcGIS server and Python. When trying to execute a query using the last end point for a map service, I am getting the value of a field that is esriFieldTypeDate which is in the negative era in the Jasonson response. The JSON response looks like this:
{"feature": {"attributes": {"OBJECTID": 11, "basin": "North Atlantic", "TRACK_DATE": -3739996800000, }, "Geometry": {"path": [[-99.9999999999999, 30.0000000000001], [-100.1, 30.50000000000]]]}}} The area I am referring to "In the above JSON" TRACK_DATE "the values returned by the Argus server are always in milliseconds since the ArcGIS server also provides an HTML response and TRACK_DATE field for the same query" TRACK_DATE: 1851/06/27 00:00 : 00 UTC " Is displayed in the form.
So, the date is 1900, and I understand that I do not have the ability to handle dates prior to 1900 DatedTime module built in Python, I understand 32-bit Python V2.6.
datetime.datetime.utcfromtimestamp (float (-3739996800000) / 1000) However, it fails I
Value error: How is the timestamp out of bounds for platform local time () / GMTM () function ? In Python 2.6? I have looked at the same posts, but one can not find what explains working with negative ages.
This works for me:
datetime.datetime ( 1970, 1, 1) + datetime.timedelta (secs = (- 3739996800000/1000)) A ???? datetime.datetime (1851, 6, 27, 0, 0) This better stack is asked overflow because it is more specific Python GIS specific.
No comments:
Post a Comment