Skip to content

Date shifts to previous day in single submission view modal when browser timezone behind UTC #5771

@esario

Description

@esario

Description

When you have a date question in a form and view a submission in KPI, the date shifts one day back on a computer that is behind UTC timezone.

Steps to reproduce

  1. Switch your computer timezone to e.g. UTC -5
  2. Deploy the following XLSForm and submit the form once. Use today's date in the date picker.
type name label required calculation
start start      
end end      
date activity_date Date of the activity TRUE  
  1. Navigate to table view and note that the date captured shows today's date
Image
  1. Click the view icon to open the single submission view modal and note that the date has shifted back by one day.
Image
  1. (Click view to open in Enketo and note that the date is today's date)
Image

Expected behaviour

Submission view modal shows the actual date.

Actual behaviour

Submission view modal shows the date as the actual day minus one day.

Additional context

This issue has existed at least since 2022. See the following threads on the Community:

Related to #3943?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions