Datelist element has nondeterministic timezone

Created on 5 September 2025, about 2 months ago

Problem/Motivation

Since #3009377: Replace drupal_get_user_timezone with a date_default_timezone_get() and an event listener β†’ the datelist element uses the native date_default_timezone_get function to get the default timezone for elements. This can result in non-determinism if caches are flushed via the Admin UI versus CLI (drush).

Steps to reproduce

On a hosting environment whose server timezone is UTC and whose site timezone (system.date.yml) is set to America/New_York...

  1. Flush the cache via the GUI - notice that datelist elements have a default timezone of America/New_York
  2. Flush the cache via Drush - notice that datelist elements have a default timezone of UTC

This can lead to some hard to diagnose data quality problems for downstream users - where the persisted timezone is random.

Proposed resolution

Use the configured site regional timezone, perhaps?

Remaining tasks

TBD

User interface changes

TBD

Introduced terminology

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

render system

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

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

Comments & Activities

Production build 0.71.5 2024