-
Notifications
You must be signed in to change notification settings - Fork 123
Description
When using the date editor with time and timezone enabled, the default value for the timezone is a fixed offset corresponding to the current local timezone offset in the browser. In most cases, this behavior works well, but results in unintuitive behavior when entering dates across a DST boundary.
For example if it's 2025-11-05, then my current local offset is -08:00, so if I enter a value into a Contentful date editor like 2025-10-31 10:30 AM, unless I explicitly change the offset to -07:00 which was the local offset on 2025-10-31 then the time will be an hour off.
I propose adding a Local time value to the list of zones as the default value. This value would not represent a specific UTC offset, but instead correspond to the browser's timezone. Any date value saved with the Local time zone specified would store a date string with the zone offset for that specific date and time in the local time of the editor's browser. Any existing date value rendered in the editor would sho Local time for the zone value when the browser's timezone matches the offset of the stored date for that specific date and time value, otherwise it would show the specified offset.
This should result in behavior identical to the current default, but without the need to manually adjust the zone when entering dates that have a different zone offset due to e.g. DST changes.