Bug #59613
closedDateTime values in BE are shown in UTC
0%
Description
DateTime values are not only saved in UTC but also shown in UTC in BE.
When you fill a time field with 00:01 in BE it is visible in list view as 00:01 but in FE as 01:01.
TCA
'config' => array( 'type' => 'input', 'size' => 8, 'max' => 10, 'eval' => 'time', ),
ExtBase model
/** * Start time * * @var \DateTime */ protected $startTime;
LocalConfiguration timezone settings
[SYS][phpTimeZone] = 'Europe/Amsterdam'
So it looks like that date/time values are always saved and displayed in BE as UTC and not converted to local timezone.
Updated by Frans Saris over 10 years ago
- Status changed from New to Rejected
- Priority changed from Must have to Won't have this time
Okay just TCA eval time is affected when used in extbase as DateTime property.
Looks like a timestamp thingie. If I Create a new DateTime() object and then call ->setTimestamp(60); the timezone offset changes !?
I guess it has something to do with different timezone in 1970?
So conclusion: Do not use DateTime for time fields.
Updated by Anonymous over 9 years ago
Frans Saris wrote:
Okay just TCA eval time is affected when used in extbase as DateTime property.
Looks like a timestamp thingie. If I Create a new DateTime() object and then call ->setTimestamp(60); the timezone offset changes !?
I guess it has something to do with different timezone in 1970?So conclusion: Do not use DateTime for time fields.
No solution for me. How to store a time value and a date value separately? I dont wana use old shool timestamps in modern applications.
My current workaround ist to use a unlovely own TCA-Hook for BE-Field with correct timezone.