[BUGFIX] Respect timezone in online Backend user list 62/28462/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Mon, 17 Mar 2014 11:17:11 +0000 (12:17 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 18 Mar 2014 08:39:18 +0000 (09:39 +0100)
To display the session timestamps in the online Backend users list
in the correct timezone the DateViewHelper will now create the
DateTime object because it already takes care of the correct timezone
handling.

Resolves: #56985
Releases: 6.2
Change-Id: I65003c3f5505f4fe96160f917131fe13a3a53416
Reviewed-on: https://review.typo3.org/28462
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserSessionRepository.php
typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html

index 0ce702f..03a3326 100644 (file)
@@ -53,7 +53,7 @@ class BackendUserSessionRepository extends \TYPO3\CMS\Extbase\Persistence\Reposi
                        $sessions[] = array(
                                'id' => $row['id'],
                                'ip' => $row['ip'],
-                               'timestamp' => new \DateTime('@' . $row['timestamp'])
+                               'timestamp' => $row['timestamp']
                        );
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
index a5053cb..76ca721 100644 (file)
@@ -19,7 +19,7 @@
                        </f:then>
                </f:if>
                <td>
-                       <f:format.date format="{dateFormat} {timeFormat}">{session.timestamp}</f:format.date>
+                       <f:format.date format="{dateFormat} {timeFormat}" date="@{session.timestamp}" />
                </td>
                <td>{session.ip}</td>
                <td>