Skip to content

[5.x]: Date field precission issue with dates far back in the past in Europe/Amsterdam timezone #16953

@JeroenJRP

Description

@JeroenJRP

What happened?

Description

When using the Date field and saving a date far in the past when using the Europe/Amsterdam timezone the date is set 1 day back.

Steps to reproduce

  1. Set system timezone to Europe/Amsterdam
  2. Add a custom Date field to an Entry Type
  3. Save entry with date field value set to e.g. 07-01-1881

Expected behavior

Value stays at 07-01-1881

Actual behavior

Value is set to 06-01-1881

When reading the value in twig with {{ item.dateField|date("Y-m-d H:i:s e") }} the displayed value is 1881-01-06 23:57:58 Europe/Amsterdam

Craft CMS version

5.6.13

PHP version

8.3.14

Operating system and version

Linux 5.15.167.4-microsoft-standard-WSL2

Database type and version

MariaDB 10.6.18

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions