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

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

Update WPF Interaction Triggers in from .Net Framework 4.8 to .Net 5

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