title: how to create datetime from a negative epoch in Python
body: <p>First timer on StackExchange.</p>
  
  <p>I am working with ArcGIS Server and Python. While trying to execute a query using the REST endpoint to a map service, I am getting the values for a  field that is esriFieldTypeDate in negative epoch in the JSON response. 
  The JSON response looks like this:</p>
  
  <pre><code>    {
    "feature" :
    {
      "attributes" : {
        "OBJECTID" : 11,
        "BASIN" : "North Atlantic",
        "TRACK_DATE" : -3739996800000,
      }
      ,
      "geometry" :
      {
        "paths" :
        [
          [
            [-99.9999999999999, 30.0000000000001],
            [-100.1, 30.5000000000001]
          ]
        ]
      }
    }
  }
  </code></pre>
  
  <p>The field I am referring to is "TRACK_DATE" in the above JSON. The values returned by ArcGIS Server are always in milliseconds since epoch. ArcGIS Server also provides a HTML response and the TRACK_DATE field for the same query is displayed as  "TRACK_DATE: 1851/06/27 00:00:00 UTC".</p>
  
  <p>So, the date is pre 1900 and I understand the Python in-built datetime module is not able to handle dates before 1900. I am using 32-bit Python v2.6. I am trying to convert it to a datetime by using</p>
  
  <p><code>datetime.datetime.utcfromtimestamp(float(-3739996800000)/1000)</code></p>
  
  <p>However, this fails with </p>
  
  <pre><code>ValueError: timestamp out of range for platform localtime()/gmtime() function
  </code></pre>
  
  <p>How does one work with epochs that are negative and pre 1900 in Python 2.6? I have looked at similar posts, but could not find one that explains working with negative epochs. </p>