Code snippet: Get DateTime from UTC timestamp in ArcGIS Online

 ArcGIS Online stores all date values in UTC.  A short snippet to convert UTC timestamp to DateTime using Python.

      from datetime import datetime

      utcTimeStamp = 1472218452855

      date = datetime.fromtimestamp(utcTimeStamp / 1e3)
      
      print(date)

output: 2016-08-26 09:34:12.855000

Comments

Popular posts from this blog

Prevent WPF Global Keyboard Hook from stops working after hitting keys a while C# .NET

Generate ArcGIS Token By URL Request From ArcGIS Portal, Federated Environment , ESRI JS API and Angular snippets

Solution: IntelliJ not recognizing a particular file correctly, instead its stuck as a text file