off-by-one day errors + timezone errors when using SDC components with a date or date-time prop

Created on 7 January 2026, 5 days ago

Overview

Identified at #3550882-8: Empty (optional) date prop throws error upon reload, due to bug in client-side transform

Given a SDC component with a date field.
After adding the component to a page, if I pick 12/10/2025, publish, and refresh the page, it renders as 12/09/2025. This might be an issue in the transform itself or some funny timezone/daylight timesaving issue:

Steps to reproduce

  1. Enable sdc_test_all_props
  2. Add all-props to a page.
  3. On String, format=date-time, I set 27/08/2016 22:00
  4. On String, format=date, I set 27/08/2016 (it's around 20:00 now at GMT+2)
  5. Preview shows 2016-08-27T22:00:00.000Z and 2016-08-27 as ¿expected?
  6. Forms shows 27/08/2016 22:00 and 27/08/2016 as expected.
  7. Save and visit page. It shows the value expected as above.
  8. Go to edit and select the component.
  9. Preview shows 2016-08-27T22:00:00.000Z and 2016-08-27 as ¿expected?
  10. Forms shows 28/08/2016 00:00 🤯 and 26/08/2016 🤯.

Proposed resolution

There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors, and I'm never late to meetings, you created the appointment in the wrong timezone.

User interface changes

TBD

🐛 Bug report
Status

Active

Version

1.0

Component

Redux-integrated field widgets

Created by

🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024