<?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: CreateWebLayerSDDraft doesn't include Date Field configuration? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856345#M4022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this work for a file GDB? I added this parameter and got the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"User cant overwrite this service, using this data, as this data is already referring to another service.&lt;BR /&gt;(Error Code: 500)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This GDB is only being used in one service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Aug 2020 13:06:43 GMT</pubDate>
    <dc:creator>SaraJK</dc:creator>
    <dc:date>2020-08-28T13:06:43Z</dc:date>
    <item>
      <title>CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856341#M4018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I'm having an issue where I'm trying to automate publishing a feature service to AGO using python where it's failing at the analyze during StageService_server ([{"code":"00129","message":"Map has layers that record Editor Tracking dates in database time zone, but time zone has not been defined","object":"Map"}]).&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;The layers successfully publish using ArcGIS Pro 2.4 when setting the Date Field configuration to the appropriate time zone (as I'm using database time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="452438" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/452438_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming there is no Date Field configuration with CreateWebLayerSDDraft as it's not in the documentation.&amp;nbsp; Am I missing something?&amp;nbsp; Is there a work around that anyone knows about?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm messing around with the sddraft configuration and setting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;PropertySetProperty xsi:type='typens:PropertySetProperty'&amp;gt;&amp;lt;Key&amp;gt;hasEditorTrackingDatesInDbTimezone&amp;lt;/Key&amp;gt;&amp;lt;Value xsi:type='xs:string'&amp;gt;true&amp;lt;/Value&amp;gt;&amp;lt;/PropertySetProperty&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't seem to help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jul 2019 17:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856341#M4018</guid>
      <dc:creator>SeanLawrence</dc:creator>
      <dc:date>2019-07-05T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856342#M4019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would look at dateFieldsTimeReference for use with the publish_parameters option.&amp;nbsp; It would look something like this in code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;from arcgis.gis import GIS&lt;BR /&gt; sd_itemid = "a71a0a30cd0e4cde9d196f99e935a919"&lt;BR /&gt; gis = GIS("&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com" style="padding: calc(12px + 0.35ex) 0px 0px; font-weight: inherit; font-style: inherit;"&gt;&lt;SPAN style="color: #287433; border: none windowtext 1.0pt; padding: 0in;"&gt;https://www.arcgis.com&lt;/SPAN&gt;&lt;/A&gt;", "YourAGOLUserName")&lt;BR /&gt; &lt;BR /&gt; #Find SD file, then update or add, then publish&lt;BR /&gt; sd_item = gis.content.get(sd_itemid)&lt;BR /&gt; &lt;BR /&gt; #Parameters for editor tracking&lt;BR /&gt; pub_params = {"dateFieldsTimeReference" : {"timeZone":"Pacific Standard Time"}}&lt;BR /&gt; &lt;BR /&gt; sd_item.publish(publish_parameters=pub_params, overwrite=True)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;More of the doc can be found here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/publish-item.htm"&gt;https://developers.arcgis.com/rest/users-groups-and-items/publish-item.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 21:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856342#M4019</guid>
      <dc:creator>ScottMoore__Olympia_</dc:creator>
      <dc:date>2020-04-13T21:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856343#M4020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3680"&gt;Scott Moore (Olympia)&lt;/A&gt;‌ thank you for posting this. I was able to add it to my script, and update the time zone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:43:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856343#M4020</guid>
      <dc:creator>NataliyaLys</dc:creator>
      <dc:date>2020-06-22T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856344#M4021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/21893"&gt;Sean Lawrence&lt;/A&gt;‌ Does this answer this question?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2020 20:58:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856344#M4021</guid>
      <dc:creator>ScottMoore__Olympia_</dc:creator>
      <dc:date>2020-06-22T20:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856345#M4022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this work for a file GDB? I added this parameter and got the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"User cant overwrite this service, using this data, as this data is already referring to another service.&lt;BR /&gt;(Error Code: 500)"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This GDB is only being used in one service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856345#M4022</guid>
      <dc:creator>SaraJK</dc:creator>
      <dc:date>2020-08-28T13:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856346#M4023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I&amp;nbsp;only tested with&amp;nbsp;a service definition file, not a file geodatabase.&amp;nbsp; It does look like it should work from a file geodatabase based on the API ref:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.publish" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.Item.publish"&gt;arcgis.gis module — arcgis 1.8.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the error, it appears that the feature service has already been published from the file geodatabase.&amp;nbsp; You could delete the feature service (keep the file geodatabase item) and try it (make sure you have backed up the feature service if there have been changes to it that you want to keep).&amp;nbsp; The &lt;SPAN style="background-color: #ffffff;"&gt;sd_itemid would point to an item of type "File Geodatabase" that hasn't yet had a feature service published from it.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 20:36:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/856346#M4023</guid>
      <dc:creator>ScottMoore__Olympia_</dc:creator>
      <dc:date>2020-08-28T20:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: CreateWebLayerSDDraft doesn't include Date Field configuration?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/1265811#M8475</link>
      <description>&lt;P&gt;Hi Scott,&lt;/P&gt;&lt;P&gt;Thank you for posting this solution, and I know it is now three years later, but this no longer works per the documentation. Per the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html" target="_self"&gt;Developers Page&lt;/A&gt;&amp;nbsp;you cannot combine a publish parameters with an overwrite&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamieWhite_0-1678317273015.png" style="width: 723px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64767i732A176C013F9440/image-dimensions/723x100?v=v2" width="723" height="100" role="button" title="JamieWhite_0-1678317273015.png" alt="JamieWhite_0-1678317273015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Do you have any other thoughts on how to set the Time Zone for your service you are trying to overwrite.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 23:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/createweblayersddraft-doesn-t-include-date-field/m-p/1265811#M8475</guid>
      <dc:creator>JamieWhite</dc:creator>
      <dc:date>2023-03-08T23:18:02Z</dc:date>
    </item>
  </channel>
</rss>

