On Paris timezone, impossible to set a date to 2023/03/31 02:00:00

Created on 22 December 2023, 11 months ago
Updated 23 December 2023, 11 months ago

Problem/Motivation

When trying to save the datetime 2023/03/31 02:00:00 into a date or a date range field, I have a validation error. On a website timezone set to Paris.

Same problem for any time between 02:00:00 and 02:59:00 at this precise date.

Initially I had a fatal error like on πŸ› DateTimeComputed tries to compute from an empty value Needs work , but it was on a daterange field on a content type with Metatags, and thought it was coming from there but no, it is just this date that is problematic.

Steps to reproduce

PHP 8.1
Drupal 10.0.11

- Add a date field on a content type.
- The date field is configured to be date and time.
- Have the site timezone set to Paris. (Maybe also the PHP date.timezone set on Europe/Paris)
- Create a node with the date set to 2023/03/31 02:00:00,
- Save and get a validation error.

Proposed resolution

Remaining tasks

Determine why the date object is not created.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: works as designed

Version

10.0 ✨

Component
DatetimeΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

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

Comments & Activities

  • Issue created by @Grimreaper
  • Status changed to Postponed: needs info 11 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Isn't that just because that time doesn't exist? Europe moves to daylight savings time between those hours and so the clock jumps from 01:59:59 to 03:00:00.

  • Status changed to Closed: works as designed 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Sounds like this works as designed

  • πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

    Hi,

    Thanks for the quick feedback.

    First time this happens to me on a project. I have totally forgotten this time move...
    The probability to have an event which ends precisely this day at this time...

    Sorry for the noise... Date and time, always a nightmare.

    I just wonder in the opposite way (when going back of one hour), when for example entering this in the datetime widget 2024/10/27 02:30:00, is it designating the time before the time move or after the time move? How to be able to designate one or the other? Or is it existing in timestamp only but in datetime, this hour does not exist too?

Production build 0.71.5 2024