AnsweredAssumed Answered

How can I convert 10 digit epoch time to correct date/time?

Question asked by jswilkerson on May 11, 2020
Latest reply on May 11, 2020 by jswilkerson

Issue DescriptionShow All

We have a GeoEvent Input connector reading a JSON web service for bus locations.  The time field is called 'timestamp' and it is in an epoch time stamp format such as '1589215201' (converts to the right date/time on https://www.epochconverter.com/).  The input connector definition defines this as a date with nothing specified as the date format.  There is a field mapper to move this into a featureclass output as the input schema/geoevent definition is not flat.  The output connectior updates a featureclass on our Portal system and the timestamp field becomes the eventtime field but is still considered a date type.  

 

 

 

 

When this runs everything works fine with no errors in the GeoEvent logs, but the date for all records is '1/19/1970 9:27:03 AM'.  The only difference that I can see from the Esri documentation is that our 'epoch' time format has only 10 characters, where the Esri examples show 13, but our numbers still validate at the EpochConverter web site.  

 

Is GeoEvent server not able to handle this as a date?  Or is there a way to read it in as a string, or a long, and then convert it to the correct date?

Outcomes