<?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 When editing date attribute gets saved one day into the past in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99292#M9090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem with V2.5 of the JS API (although seems to be the same for previous versions).&amp;nbsp; The problem is editing and entering a date attribute which then gets saved to the database with a date one day into the past.&amp;nbsp; I have seen some similar forum posts about this, but not relating to the JS API, and not specifically like my problem ??? I will attempt to describe below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Layers come from SDE V10, SP1 and some have date fields.&amp;nbsp; Using the out the box template picker and editor dijits (so no custom code) a user can place a point on the map and the attribute info window pops up and they can pick a date from the date picker.&amp;nbsp; If they pick today's date, or a date into the future then that date gets saved correctly into the database.&amp;nbsp; HOWEVER, if they pick a date in the past, then the date gets saved to the database one day further into the past.&amp;nbsp; For example a user selects 31/10/2011 in the date picker (and the current date is the same 31/10/2011) then this saves as you would expect as 31/10/2011 into the database, if they select 30/10/2011 (yesterday), this gets saved as 29/10/2011 in the database.&amp;nbsp; What's also interesting is that the value in the database is 29/10/2011, but when the user edits the point attributes using the info window, the displayed date is 30/10/2011.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This must have something to do with the info window attribute editor code, but as this is out of my control I don't know how to fix this problem.&amp;nbsp; It is very strange that only past dates exhibit this problem.&amp;nbsp; This is an issue because I want to store correct dates in the database of course.&amp;nbsp; I'm in the UK by the way which might have a bearing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please help solve this puzzle?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, Mark.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2011 11:23:55 GMT</pubDate>
    <dc:creator>MarkSmith</dc:creator>
    <dc:date>2011-10-31T11:23:55Z</dc:date>
    <item>
      <title>When editing date attribute gets saved one day into the past</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99292#M9090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a problem with V2.5 of the JS API (although seems to be the same for previous versions).&amp;nbsp; The problem is editing and entering a date attribute which then gets saved to the database with a date one day into the past.&amp;nbsp; I have seen some similar forum posts about this, but not relating to the JS API, and not specifically like my problem ??? I will attempt to describe below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Layers come from SDE V10, SP1 and some have date fields.&amp;nbsp; Using the out the box template picker and editor dijits (so no custom code) a user can place a point on the map and the attribute info window pops up and they can pick a date from the date picker.&amp;nbsp; If they pick today's date, or a date into the future then that date gets saved correctly into the database.&amp;nbsp; HOWEVER, if they pick a date in the past, then the date gets saved to the database one day further into the past.&amp;nbsp; For example a user selects 31/10/2011 in the date picker (and the current date is the same 31/10/2011) then this saves as you would expect as 31/10/2011 into the database, if they select 30/10/2011 (yesterday), this gets saved as 29/10/2011 in the database.&amp;nbsp; What's also interesting is that the value in the database is 29/10/2011, but when the user edits the point attributes using the info window, the displayed date is 30/10/2011.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This must have something to do with the info window attribute editor code, but as this is out of my control I don't know how to fix this problem.&amp;nbsp; It is very strange that only past dates exhibit this problem.&amp;nbsp; This is an issue because I want to store correct dates in the database of course.&amp;nbsp; I'm in the UK by the way which might have a bearing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone please help solve this puzzle?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, Mark.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 11:23:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99292#M9090</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2011-10-31T11:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: When editing date attribute gets saved one day into the past</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99293#M9091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have a problem with V2.5 of the JS API (although seems to be the same for previous versions).&amp;nbsp; The problem is editing and entering a date attribute which then gets saved to the database with a date one day into the past.&amp;nbsp; I have seen some similar forum posts about this, but not relating to the JS API, and not specifically like my problem �?? I will attempt to describe below.&lt;BR /&gt;&lt;BR /&gt;Layers come from SDE V10, SP1 and some have date fields.&amp;nbsp; Using the out the box template picker and editor dijits (so no custom code) a user can place a point on the map and the attribute info window pops up and they can pick a date from the date picker.&amp;nbsp; If they pick today's date, or a date into the future then that date gets saved correctly into the database.&amp;nbsp; HOWEVER, if they pick a date in the past, then the date gets saved to the database one day further into the past.&amp;nbsp; For example a user selects 31/10/2011 in the date picker (and the current date is the same 31/10/2011) then this saves as you would expect as 31/10/2011 into the database, if they select 30/10/2011 (yesterday), this gets saved as 29/10/2011 in the database.&amp;nbsp; What's also interesting is that the value in the database is 29/10/2011, but when the user edits the point attributes using the info window, the displayed date is 30/10/2011.&lt;BR /&gt;&lt;BR /&gt;This must have something to do with the info window attribute editor code, but as this is out of my control I don't know how to fix this problem.&amp;nbsp; It is very strange that only past dates exhibit this problem.&amp;nbsp; This is an issue because I want to store correct dates in the database of course.&amp;nbsp; I'm in the UK by the way which might have a bearing.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help solve this puzzle?&lt;BR /&gt;&lt;BR /&gt;Thank you, Mark.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Enable time on the layer in you .mxd/.msd. Setting up the time zone to your time zone.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 12:20:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99293#M9091</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-10-31T12:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: When editing date attribute gets saved one day into the past</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99294#M9092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, but this didn't make any difference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 12:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99294#M9092</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2011-10-31T12:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: When editing date attribute gets saved one day into the past</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99295#M9093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just tested this very thing and don't see the behavior you're referring to.&amp;nbsp; I'm using jsapi v2.6.&amp;nbsp; Could it be an issue with the fact that the feature service writes UTC times into SDE and you're displaying local times?&amp;nbsp; However that shouldn't change the date.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2011 16:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/when-editing-date-attribute-gets-saved-one-day/m-p/99295#M9093</guid>
      <dc:creator>DavidHollema</dc:creator>
      <dc:date>2011-12-16T16:48:31Z</dc:date>
    </item>
  </channel>
</rss>

