<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I convert 10 digit epoch time to correct date/time? in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381463#M1620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Egge-Jan, that solution works.&amp;nbsp; I created a field calculator processesor which feeds into a field mapper processesor and that is pulled into the output feature web service.&amp;nbsp; The input connector has the field as a long, the field calculator multiplies this by 1000 and sends it to a new date field.&amp;nbsp; Then the final connector has a date field to accept the mapped field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2020 22:08:04 GMT</pubDate>
    <dc:creator>JeffreyWilkerson</dc:creator>
    <dc:date>2020-05-11T22:08:04Z</dc:date>
    <item>
      <title>How can I convert 10 digit epoch time to correct date/time?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381459#M1616</link>
      <description>&lt;P&gt;We have a GeoEvent input reading a JSON web service for bus locations. The time field is called 'timestamp' and its value is an epoch time stamp such as '1589215201' (converts to the right date/time on &lt;A href="https://www.epochconverter.com/)" target="_blank"&gt;https://www.epochconverter.com/)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;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 feature class output as the input schema/geoevent definition is not flat.&amp;nbsp; The output connector updates a feature class on our Portal system and the timestamp field becomes the 'eventtime' field but is still considered a date type.&lt;/P&gt;&lt;P&gt;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'.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;Is GeoEvent server not able to handle this as a date?&amp;nbsp; Or is there a way to read it in as a string, or a long, and then convert it to the correct date?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 23:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381459#M1616</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2021-04-22T23:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert 10 digit epoch time to correct date/time?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381460#M1617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/6332"&gt;Jeffrey Wilkerson&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you see this blogpost: &lt;A href="https://community.esri.com/community/gis/enterprise-gis/geoevent/blog/2019/03/14/what-time-is-it-well-that-depends"&gt;https://community.esri.com/community/gis/enterprise-gis/geoevent/blog/2019/03/14/what-time-is-it-well-that-depends&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like GeoEvent likes its epoch time in milliseconds, so maybe you should multiply your time stamps by a thousand: &lt;SPAN&gt;1589215201&lt;/SPAN&gt; * 1000 gives 1589215201000‬. Hey, this is 13 characters instead of 10... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this solution work for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 20:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381460#M1617</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2020-05-11T20:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert 10 digit epoch time to correct date/time?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381461#M1618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Egge-Jan.&amp;nbsp; I've seen that blogpost and it's a good one that I keep going back to.&amp;nbsp; It doesn't directly answer my question though as it says GeoEvent is expecting UTC format, just as the Esri documentation is.&amp;nbsp; I think it's expecting a 13 character UTC format only though.&amp;nbsp; With that, your solution looks like it would work.&amp;nbsp; I will give it a shot.&amp;nbsp; I would still like to know if it is indeed the case that GeoEvent server can't read a 10 character UTC format though.&amp;nbsp; If you enter 1589215201 into the EpochConverter web site it gives you the same date/time as 1589215201000, the smaller number is just in seconds and the latter in miliseconds.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 20:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381461#M1618</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2020-05-11T20:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert 10 digit epoch time to correct date/time?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381462#M1619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it will solve your issue. Just let us know the results of your test. And: don't forget to mark the question as being answered correctly (if this is indeed the solution...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 21:23:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381462#M1619</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2020-05-11T21:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I convert 10 digit epoch time to correct date/time?</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381463#M1620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Egge-Jan, that solution works.&amp;nbsp; I created a field calculator processesor which feeds into a field mapper processesor and that is pulled into the output feature web service.&amp;nbsp; The input connector has the field as a long, the field calculator multiplies this by 1000 and sends it to a new date field.&amp;nbsp; Then the final connector has a date field to accept the mapped field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2020 22:08:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/how-can-i-convert-10-digit-epoch-time-to-correct/m-p/381463#M1620</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2020-05-11T22:08:04Z</dc:date>
    </item>
  </channel>
</rss>

