Issue with Dates and URL Parameters

688
1
09-20-2019 05:20 AM
HECAdmin
New Contributor III

I'm having an issue with passing dates into a Survey123 form via URL from a web map. My survey is based on a feature service that is hosted on our on-premises ArcGIS Enterprise 10.6.1 server. The form has 4 dates that are set by the user. When I pass the dates into the Survey123 native form (windows and iOS), they are a day behind what is passed in. IT doesn't appear we have the same issue with the web form. 

Here are the date fields from the XLS Form:

I also have a web map that takes the existing fields and passes them into the Survey123 native app via URL. I do this so the user can change one field but keep others, but we will have a way to know that the updates have taken place so it submits as a new Survey. This is the popup in the web app:

This is the URL in the Open in Survey123 link (redacted for privacy):

arcgis-survey123://?itemID=99999
&field:DateStarted=10/01/2019
&field:DateFinished=10/01/2019
&field:ScheduledWork=10/01/2019
&field:ScheduledWorkEndDate=10/01/2019

And this is what the form looks like when it opens in the windows or iOS app:

Any help would be greatly appreciated. 

0 Kudos
1 Reply
DougBrowning
MVP Esteemed Contributor

Which version of the app are you using?  Older versions always defaulted a date with no time to midnight.  Then at some point Arc tries to convert the time stored from UTC to local time or local to UTC depending on the service/form you are using.  So if you are at midnight and subtract hours to UTC then you end up on a different day.  It could also be you are adding hours which changes the date.

The newer apps default to noon instead so it helps.

You could also change the form to date time to you get a specific time as well.

If you search the forum there are several posts about this.

Timezone issue 

https://community.esri.com/thread/240034-new-behavior-in-utc-offset-in-date-field-in-v35177 

0 Kudos