Project

General

Profile

Actions

Bug #92391

closed

DateTime property has wrong TimeZone in Backend List view

Added by Felix Holler about 4 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2020-09-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Timezone, DateTime
Complexity:
Is Regression:
Sprint Focus:

Description

I have an object that has a DateTime property.

/**
 * date
 * 
 * @var \DateTime
 */
 protected $date = null;

/**
 * Returns the date
 * 
 * @return \DateTime $date
 */
public function getDate()
{
    return $this->date;
}

/**
 * Sets the date
 * 
 * @param \DateTime $date
 * @return void
 */
public function setDate(\DateTime $date)
{
    $this->date = $date;
}

This Property is set in a controller action with:

$date = new \DateTime(date('Y-m-d H:i:s'), new \DateTimeZone('Europe/Berlin'));
$newOrder->setDate($date);

The Date gets stored in the mySQL database, but it is converted to UTC time (-2:00), which is okay, since it is correctly rendered in the frontend by f:formate.date viewhelper. My [SYS][phpTimeZone] = 'Europe/Berlin'.

The Problem now is in the backend list view. The Date field is not converted back in the correct time zone which is very confusing to the Editors. But the CRDATE is converted correctly. Both dates should be the same.

I think every DateTime property is supposed to be converted to the correct timezone, or am I getting it totally wrong?


Files

Bildschirmfoto 2020-09-23 um 19.15.39.png (53.1 KB) Bildschirmfoto 2020-09-23 um 19.15.39.png screenshot of listview in typo3 backend Felix Holler, 2020-09-23 19:16

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #102087: Backend user need a own timezoneClosed2023-10-04

Actions
Related to TYPO3 Core - Feature #61110: Support for timezones in all date fields in TYPO3 BENew2014-08-21

Actions
Actions #1

Updated by Daniel Goerz about 4 years ago

  • Description updated (diff)
Actions #2

Updated by Georg Ringer 5 months ago

  • Related to Bug #102087: Backend user need a own timezone added
Actions #3

Updated by Georg Ringer 5 months ago

  • Status changed from New to Closed

closing as duplicate of #61110 which is the existing umbrella task for that

Actions #4

Updated by Georg Ringer 5 months ago

  • Related to Feature #61110: Support for timezones in all date fields in TYPO3 BE added
Actions

Also available in: Atom PDF