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

[Code Snippet] Assert Exception in private methods using PrivateObject

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

[Code snippet] How to set value of private variable in Unit Test Using Reflection ?