<?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: Issue with Dates and FeatureLayer.applyEdits in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221679#M5237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A documentation enhancement was logged recently to provide additional clarification to developers regarding this issue.&amp;nbsp; Please don't hesitate to contact Esri technical support to add your name to the list of customers requesting that the issue be resolved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[NIM077729 Enhancement: Include information in the documentation to notify developers that it is expected behavior that local time will be converted to UTC when editing, but that they must add their own logic to convert back to local time when retrieving features.]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2012 21:19:29 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2012-02-07T21:19:29Z</dc:date>
    <item>
      <title>Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221671#M5229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having an issue with storing a FULL datetime back to SDE when using FeatureLayer.applyEdits.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The scenario is the user has a dialog where they choose a date from a mx DateField and also has a yahoo TimeStepper where they choose the time. A new date is created in ActionScript using this line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;vvar bDate:Date = new Date(DTPicker1.selectedDate.fullYear,DTPicker1.selectedDate.month,DTPicker1.selectedDate.date,DTPicker3.value.hours,DTPicker3.value.minutes,0,0);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; Which when debuging shows the date as:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;bDate = &amp;lt;Sun Nov 6 19:00:00 GMT-0600 2011&amp;gt; (@d3150c1)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; This is accurate as the date entered in the Dialog was 11-6-2011 7:00 PM Central Standard Time. &lt;/SPAN&gt;&lt;STRONG&gt;What is entered in &lt;SPAN style="font-size:4;"&gt;SDE&lt;/SPAN&gt; though is &lt;SPAN style="font-size:4;"&gt;11/7/2011 1:00:00 AM&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; (not talking about what is returned by Flex)&lt;/SPAN&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what do do here.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 12:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221671#M5229</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-11-08T12:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221672#M5230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&amp;nbsp; Feature objects returned by ArcGIS Server represent the number of milliseconds since epoch (January 1, 1970) in UTC. This would explain why you see 11/7/2011 1:00:00 AM.&amp;nbsp; When you display dates in Flex you can use Flex's getTimezoneOffset() to convert dates from one time zone to another.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Object Dates&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/feature.html"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/feature.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Flex stuff&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://livedocs.adobe.com/flex/3/html/help.html?content=08_Dates_and_times_3.html"&gt;http://livedocs.adobe.com/flex/3/html/help.html?content=08_Dates_and_times_3.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doug Carroll, ESRI Support Services SDK Team &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/"&gt;http://support.esri.com/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:42:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221672#M5230</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-11-08T14:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221673#M5231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Doug,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I would understand that if the value when opening the MXD that the Feature service is coming from did not have the value of "11/7/2011 1:00:00 AM" actually written in the date field.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221673#M5231</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-11-08T14:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221674#M5232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some time ago we had the same problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://web.zone.ee/bespiva/"&gt;Sample.&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 17:02:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221674#M5232</guid>
      <dc:creator>IvanBespalov</dc:creator>
      <dc:date>2011-11-08T17:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221675#M5233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ivan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; have you verified what is actually being written to the date field in your GeoDatabase?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 19:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221675#M5233</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-11-08T19:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221676#M5234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is the code I ended up having to use to get the correct dates entered in my SDE (SQL Server 2005)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var bDate:Date = new Date(DTPicker1.selectedDate.getFullYear(),DTPicker1.selectedDate.getMonth(),DTPicker1.selectedDate.getDate(),DTPicker3.value.getHours(),DTPicker3.value.getMinutes(),0,0);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offsetMilliseconds = bDate.getTimezoneOffset() * 60 * 1000;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bDate.setTime(bDate.getTime() - offsetMilliseconds);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attribs.Begin_Date_Occ = bDate.getTime();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221676#M5234</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T10:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221677#M5235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did not have the exact documentation you were looking for this morning but found the documentation this afternoon.&amp;nbsp; This discussion can get complicated fast, but the long and short is that ArcGIS Server stores dates in UTC.&amp;nbsp; This server feature is to help keep track of editing given that people can edit the same data source (feature service) in different timezones. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This topic was covered in our troubleshooting section in the help.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisonline/help/index.html#//010q00000007000000"&gt;http://help.arcgis.com/en/arcgisonline/help/index.html#//010q00000007000000&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Certainly there may be better ways for handling dates, so if you have ideas please post them to the ideas site.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://ideas.arcgis.com/"&gt;http://ideas.arcgis.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Doug Carroll, ESRI Support Services SDK Team&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/"&gt;http://support.esri.com/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 22:33:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221677#M5235</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-11-08T22:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221678#M5236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Doug,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Thanks for the info. It would be nice if the APIs would make this very clear, or handle the conversion automatically, or only accept UTC dates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 01:07:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221678#M5236</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-11-09T01:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221679#M5237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A documentation enhancement was logged recently to provide additional clarification to developers regarding this issue.&amp;nbsp; Please don't hesitate to contact Esri technical support to add your name to the list of customers requesting that the issue be resolved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[NIM077729 Enhancement: Include information in the documentation to notify developers that it is expected behavior that local time will be converted to UTC when editing, but that they must add their own logic to convert back to local time when retrieving features.]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 21:19:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221679#M5237</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2012-02-07T21:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Dates and FeatureLayer.applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221680#M5238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;John, I think this is a really bad solution. Ultimately this isn't what ArcMap does. ArcMap stores the local date and time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can enter a date via the Flex API and it ends up in the database at -1 hour. Using ArcMap editing the same field it goes in correctly. I can even use ArcMap to edit the data via the Feature Service and it goes in correctly. This obviously isn't using the REST API but that should make no difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The vast vast majority of users don't share data across time zones. It is a use case to suit a tiny minority which will inconvenience the vast majority. At the very least there should be an override within the API which allows you to choose whether your date will be local or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Rob for posting your solution. It confirms the approach that I'm going to take but which I assumed just couldn't be correct.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 15:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/issue-with-dates-and-featurelayer-applyedits/m-p/221680#M5238</guid>
      <dc:creator>PhilipThompson</dc:creator>
      <dc:date>2012-07-20T15:15:34Z</dc:date>
    </item>
  </channel>
</rss>

