<?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 Date(milliseconds) constructor in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-milliseconds-constructor/m-p/209100#M19392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After my previous flame, which I retracted, I'm going to try to make my case in a more civilized manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a serious problem with the REST API and the JavaScript API in the interpretation of database date values.&amp;nbsp; If I write a client using ArcObjects, ArcGIS Pro, or a flavor of Runtime, I will not receive the same value for a geodatabase feature date field as I will via the JavaScript API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I researched this issue, and discovered that this problem is due to the core JavaScript Date(milliseconds) constructor.&amp;nbsp; OK, this is an ECMA standard, and I can deal with that.&amp;nbsp; Nonetheless, I can't help but feel the frustration at writing different apps, using different technologies, that do not report the same value sent across a network the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's one thing I really despise as a developer, it's having to create workarounds to what I consider to be fundamental failures.&amp;nbsp; Yes, I can write a custom widget as an alternative to the web map popup, or I can write a Server Object Interceptor to deal with the REST response.&amp;nbsp; I have successfully tested both approaches, but not to my complete satisfaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fact is: I really, truly, don't feel that I should be doing that.&amp;nbsp; Unless someone [hopefully] replies with a brilliant flash that makes me slap my forehead, I will be submitting an [or promoting an existing] idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Nov 2015 15:54:22 GMT</pubDate>
    <dc:creator>MarkCederholm</dc:creator>
    <dc:date>2015-11-14T15:54:22Z</dc:date>
    <item>
      <title>Date(milliseconds) constructor</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-milliseconds-constructor/m-p/209100#M19392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After my previous flame, which I retracted, I'm going to try to make my case in a more civilized manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a serious problem with the REST API and the JavaScript API in the interpretation of database date values.&amp;nbsp; If I write a client using ArcObjects, ArcGIS Pro, or a flavor of Runtime, I will not receive the same value for a geodatabase feature date field as I will via the JavaScript API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I researched this issue, and discovered that this problem is due to the core JavaScript Date(milliseconds) constructor.&amp;nbsp; OK, this is an ECMA standard, and I can deal with that.&amp;nbsp; Nonetheless, I can't help but feel the frustration at writing different apps, using different technologies, that do not report the same value sent across a network the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's one thing I really despise as a developer, it's having to create workarounds to what I consider to be fundamental failures.&amp;nbsp; Yes, I can write a custom widget as an alternative to the web map popup, or I can write a Server Object Interceptor to deal with the REST response.&amp;nbsp; I have successfully tested both approaches, but not to my complete satisfaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fact is: I really, truly, don't feel that I should be doing that.&amp;nbsp; Unless someone [hopefully] replies with a brilliant flash that makes me slap my forehead, I will be submitting an [or promoting an existing] idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 15:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-milliseconds-constructor/m-p/209100#M19392</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2015-11-14T15:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date(milliseconds) constructor</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-milliseconds-constructor/m-p/209101#M19393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a solution, which is to override the Date(milliseconds) constructor.&amp;nbsp; It's not perfect (it won't work for people using the map viewer in Portal), but it works in a web app, anyway.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F13839318%2Fjavascript-override-date-prototype-constructor" rel="nofollow" target="_blank"&gt;http://stackoverflow.com/questions/13839318/javascript-override-date-prototype-constructor&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 19:13:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-milliseconds-constructor/m-p/209101#M19393</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2015-11-16T19:13:34Z</dc:date>
    </item>
  </channel>
</rss>

