Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

Time support not being converted for the Service object/layer object #166

Closed jmwenda closed 8 years ago

jmwenda commented 8 years ago

After creating a service object using the library, and one tries to get the timeInformation, time information is not passed and raises the error *\ ValueError: year is out of range

i.e http://arcgis.cast.uark.edu/ArcGIS/rest/services/AGFC/All_Deer_50MCP_Oct11/MapServer/0

achapkowski commented 8 years ago

Can you share your code?

jmwenda commented 8 years ago

So this occurs at both the service level and the layer level. i.e https://gist.github.com/jmwenda/590117812c0a058b175f

Trying the same with other time enabled services return the same error.

achapkowski commented 8 years ago

@jmwenda - Thank you for the code. I'll get back to you with what I find.

achapkowski commented 8 years ago

@jmwenda - I am able to see the timeInfo for all layers that have time info associated with them:

from __future__ import print_function
import arcrest
if __name__ == "__main__":
    url = "http://arcgis.cast.uark.edu/ArcGIS/rest/services/AGFC/All_Deer_50MCP_Oct11/MapServer"
    ms = arcrest.ags.MapService(url=url)
    for lyr in ms.layers:
        if lyr.timeInfo is None:
            print(lyr.name, "does not have timeInfo")
        else:
            print(lyr.name, "has timeInfo")