Field Date store the wrong date value in the database

Created on 19 November 2023, about 1 year ago

Problem/Motivation

When i create a field of type Date then create an article with date in the first second of a year like YYYY-01-01 00:00:00
In the database it stores the last hour of the previous year for example:
When i add an article with date 2017-01-01 00:00:00 and save it, in the table of the date field (in my case node__field_date) it stores 2016-12-31T23:00:00

PS: even i change the seconds and minutes it will always stores the previous year date for example
2023-01-01 00:59:59 it will be 2022-12-31T23:59:59

Steps to reproduce

1. Add Date field to content type
2. Add new content and set the date value to the first minute of a year some thing like 2023-01-01 00:00:00
3. Check the value in the database table of the field node__field_NAME

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: works as designed

Version

10.1 ✨

Component
DatetimeΒ  β†’

Last updated 6 days ago

Created by

πŸ‡«πŸ‡·France berramou

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

Comments & Activities

Production build 0.71.5 2024