#77562Misbehaviors with datetime values and timezones
Description
This issue serves as an umbrella collector.
We can do little to fix stuff in v7, but we shall fix a lot in v8.
The goals for v8 are:
- Same DB content as in v7
- Values written to FormEngine must contain the server’s timezone in the ISO-format
- FormEngine JS must be aware of the timezone used in BE to write back correct values
Reviews 1
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch
- Commit message
-
[TASK] Misbehaviors with datetime values and timezones Resolves: #77562 Releases: main
Subtasks 36
- Bug #37244TCA date evaluation for dates lower 01-01-1970 fails
- Feature #61110Support for timezones in all date fields in TYPO3 BE
- Bug #63482Query constraint on a DateTime field with a DateTime argument should trigger date format
- Feature #64372Add timezone-handling for value-display depending on FE-user
- Bug #66435Scheduler Task - Cron Command for recurring tasks not evaluated correctly
- Bug #66793"simulate time" in admin-panel does not respect timezone
- Bug #68651Datetime() properties have wrong timezone
- Bug #69290Dates get reduced by a day if before 1970
- Feature #72053Extbase: Support \DateTimeInterface instead of \DateTime
- Bug #73637Extbase DateTimeConverter cannot handle negative timestamps
- Bug #77563Native DBMS datetime columns are not handled correctly
- Bug #78251Not possible to output DateTime by TS
- Task #78471Acceptance test for Datepicker
- Bug #79197There should be ISO Date Format Year-Month-Day
- Bug #79249TCA fields with eval types "time" or "timesec" are incorrectly stored in the database
- Bug #79304SQL error if empty datetime value is saved
- Bug #79448Handling dates in the very past inside T3-Backend
- Bug #79557Date fields DataMapper handling problem
- Bug #79613Saving wrong Date into DB if Field is of type DATE
- Bug #80349Extbase mapping of \DateTime for integer values does not set timezone with region string but only offset
- Bug #81228l10n_mode exclude doesn't work correctly for timestamp fields
- Bug #81719DateTime comparisons not possible in 8.7
- Bug #81940FE_USER Access Stop Date
- Bug #82126EXT:belog - Error when using a custom timeframe
- Bug #91240Extbase DateTime with native dbType=datetime converts output differently
- Bug #91508It is not possible to save "negative" dates, e.g. a year before jesus christus with date inputs
- Bug #96049No timezone in Context API date aspect
- Bug #96890Wrong processing and display of native datetime(dbType) fields due to server timezone
- Bug #98045DateAspect->getTimezone (almost) never returns the correct value
- Bug #100649Extbase DataMapper doesn't respect datetime when 0 or 0000-00-00 or 0000-00-00 00:00:00 or 00:00:00
- Bug #101171EXT:belog ignores timezone in filter
- Bug #102070Validation and UX errors on TCA type=datetime when using range property
- Bug #105277Could not convert PHP value 0 to type date. Expected one of the following types: null, string, DateTime
- Feature #105549Replace fake UTC0 ISO8601 date strings by unqualified (local) ISO8601
- Bug #106364DatetimeElement stores format=time in seconds, while extbase interprets it as timezone-offset-mapped UTC timestamp, when php timezone is not UTC
- Bug #106453Record API does not respect server timezone for resolve datetime fields
Related issues 2
Files 3
History 29
Show 4 earlier messages
-
Mona Muzaffar changed Related to #80852 <span data-processor="relativetime" data-value="2017-04-15T01:17:48+00:00" > 04/15/17, 01:17 </span>
-
Markus Klein changed Duplicated by #81489 <span data-processor="relativetime" data-value="2017-06-06T18:18:25+00:00" > 06/06/17, 18:18 </span>
-
Markus Klein changed attached TYPO3 datetime evaluation.pdf <span data-processor="relativetime" data-value="2017-06-06T18:20:55+00:00" > 06/06/17, 18:20 </span>
-
Markus Klein changed description status
NewAccepted Complexity medium <span data-processor="relativetime" data-value="2017-06-06T18:23:39+00:00" > 06/06/17, 18:23 </span>
-
Markus Klein changed description <span data-processor="relativetime" data-value="2017-06-06T18:24:29+00:00" > 06/06/17, 18:24 </span>
-
Riccardo De Contardi changed
Related to #80852<span data-processor="relativetime" data-value="2017-06-07T13:08:07+00:00" > 06/07/17, 13:08 </span> -
Riccardo De Contardi changed tracker
BugEpic <span data-processor="relativetime" data-value="2017-06-07T13:10:10+00:00" > 06/07/17, 13:10 </span> -
Markus Klein changed attached TYPO3 datetime evaluation.pdf attached datetimetest.zip tracker
EpicBug TYPO3 Version 7 PHP Version 5.5 Complexity medium Is Regression 0 <span data-processor="relativetime" data-value="2017-06-07T14:13:02+00:00" > 06/07/17, 14:13 </span> -
Markus Klein changed tracker
BugEpic target version Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2017-06-07T14:13:45+00:00" > 06/07/17, 14:13 </span> -
Markus Klein changed
datetimetest.zip<span data-processor="relativetime" data-value="2017-06-08T02:40:35+00:00" > 06/08/17, 02:40 </span> -
Markus Klein changed attached datetimetest.zip <span data-processor="relativetime" data-value="2017-06-08T02:40:53+00:00" > 06/08/17, 02:40 </span>
-
Susanne Moog changed Related to #51844 <span data-processor="relativetime" data-value="2018-01-28T14:44:58+00:00" > 01/28/18, 14:44 </span>
-
David Bruchmann changed Related to #85602 <span data-processor="relativetime" data-value="2018-07-20T16:03:52+00:00" > 07/20/18, 16:03 </span>
-
Benni Mack changed category <span data-processor="relativetime" data-value="2019-04-13T08:40:23+00:00" > 04/13/19, 08:40 </span>
-
Benni Mack changed target version <span data-processor="relativetime" data-value="2019-04-17T23:40:56+00:00" > 04/17/19, 23:40 </span>
-
Christoph Dörfel commented <span data-processor="relativetime" data-value="2019-04-18T11:31:31+00:00" > 04/18/19, 11:31 </span>
-
Susanne Moog commented <span data-processor="relativetime" data-value="2019-04-18T11:42:49+00:00" > 04/18/19, 11:42 </span>
Thanks for the comment and the link. Basically we are lacking the people to tackle this issue in a broad scope currently (afaik) – if you want to get involved (or know of people interested in helping out) please feel free to join #typo3-cms-coredev on slack – else I’m not seeing any quick fixes on this topic at this point in time.
-
Benni Mack changed Sprint Focus
Stabilization Sprint<span data-processor="relativetime" data-value="2023-06-06T12:38:48+00:00" > 06/06/23, 12:38 </span> -
Georg Ringer changed Duplicated by #102087 <span data-processor="relativetime" data-value="2024-06-11T15:33:14+00:00" > 06/11/24, 15:33 </span>
-
Benjamin Franzke changed subtask #106364 <span data-processor="relativetime" data-value="2025-03-14T09:59:56+00:00" > 03/14/25, 09:59 </span>
-
Benjamin Franzke changed subtask #105277 <span data-processor="relativetime" data-value="2025-03-20T13:09:27+00:00" > 03/20/25, 13:09 </span>
-
Benjamin Franzke changed subtask #102070 <span data-processor="relativetime" data-value="2025-03-20T13:10:24+00:00" > 03/20/25, 13:10 </span>
-
Benjamin Franzke changed subtask #100649 <span data-processor="relativetime" data-value="2025-03-20T13:11:00+00:00" > 03/20/25, 13:11 </span>
-
Benjamin Franzke changed subtask #96049 <span data-processor="relativetime" data-value="2025-03-20T13:16:39+00:00" > 03/20/25, 13:16 </span>
-
Benjamin Franzke changed subtask #105549 <span data-processor="relativetime" data-value="2025-03-27T14:28:58+00:00" > 03/27/25, 14:28 </span>
-
Benjamin Franzke changed subtask #101171 <span data-processor="relativetime" data-value="2025-03-27T14:29:05+00:00" > 03/27/25, 14:29 </span>
-
Benjamin Franzke changed subtask #98045 <span data-processor="relativetime" data-value="2025-03-28T10:03:56+00:00" > 03/28/25, 10:03 </span>
-
Benjamin Franzke changed subtask #106453 <span data-processor="relativetime" data-value="2025-03-28T15:22:55+00:00" > 03/28/25, 15:22 </span>
-
Benjamin Franzke changed subtask #96890 <span data-processor="relativetime" data-value="2025-03-31T07:50:20+00:00" > 03/31/25, 07:50 </span>
Since you’re updating bug tickets where some of them are already over 3 years old (https://forge.typo3.org/issues/68651) and finally consider tackling this issue, maybe it would be worth looking at all the issues with dates and time zones, especially when saving dates for future events:
https://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a-silver-bullet/
This article is for C# but explains that it might not be enough to just save an ISO 8601 representation of the datetime. Time zone rules can change over time and existing dates in the future have to be updated accordingly. Just FYI.