Select to view content in your preferred language

Bug? Date and time calculations in Survey123 form do not work when a date after Daylight Savings Time is selected - 1 hour added to end time

480
3
03-13-2024 12:53 PM
erica_poisson
Regular Contributor

Hi -

I am posting this here because I'd submitted a ticket to Esri Technical Support and they did not get around to testing my case until after Daylight Savings Time. This issue self resolved once DST was passed, however I strongly feel as if this is a bug and wanted to bring it to the community/Survey123 team's attention. Please see below for details - these details were relevant before 3/10/24 when scheduling an appointment for a date after DST. I am happy to provide more details if anyone is interested. 


I have a Survey123 form which has been in use for about 5 years now. We use a series of calculations with date and time to schedule appointments. We are having issues with the Survey123 field app, version 3.19.120, installed on Windows desktops where any appointment made AFTER Daylight Savings Time results in an incorrect appointment end time. I have attached a copy of the XLSForm here and a Word document with some screen captures showing this example (please note this XLSForm contains a series of pulldata calculations which reference a protected hosted feature layer, so these will not work, however this will not impact testing the issue below).

Steps to reproduce this issue:

  1. Select appointment start date/time AFTER 3/10/24.
  2. Adjust appointment start time so that it starts at an interval of 20 (e.g. 0800, 0820, 0840).
  3. Click "off" to close time adjustment for appointment start time. Appointment End time adjusts but is 1 hour off (too long).

Each appointment was exactly 1 hour off (too long) in the end time.

Erica
0 Kudos
3 Replies
abureaux
MVP Regular Contributor

Could you please upload your XLSX?

I did a quick test, and was getting the expected outcomes.

My set-up:

abureaux_0-1710363934034.png

My tests:

abureaux_1-1710363961101.png

abureaux_2-1710363976645.png

abureaux_3-1710363997047.png

 

0 Kudos
erica_poisson
Regular Contributor

As I clearly mentioned in the post, this issue self resolved once we got past DST on 3/10. This post was made to hopefully, make the Survey123 team aware of a potential bug since Esri technical support did not test my case until after 3/10 when the issue had already self resolved. This was not an issue in a web form or on iOS - only the Windows field app. 

Example of issue from 3/8/24 with appointment date/time before DST - it worked fine:

erica_poisson_0-1710419759434.png

 

Example of issue from 3/8/24 with appointment date/time after DST - notice additional hour in Appointment End:

erica_poisson_1-1710419799363.png

 

The XLSForm syntax for the Appointment End calculation has been unchanged in my form for about 5 years, and has always worked as expected/reliably. In addition, we have always started taking appointments before DST for dates after DST without issue. 

date-time(decimal-date-time(${Decon_Appt_Start}) +  0.013888889)

 

Erica
0 Kudos
abureaux
MVP Regular Contributor

You can manually adjust for DST on PC though, which I did:

abureaux_0-1710430583400.png

abureaux_1-1710430593841.png

abureaux_4-1710430640326.png

 

abureaux_3-1710430608144.png

abureaux_2-1710430601249.png

abureaux_5-1710430655545.png

There may be something else at play. I am not aware of any strange interaction between DST and apps beyond this one system clock setting, but that doesn't mean that there aren't any.

0 Kudos