Project

General

Profile

Actions

Bug #49400

closed

Fix date format in BE user module - might be easier than it looks like

Added by Chris topher almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2013-06-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

The date format in the BE user module is not yet localized. Dates should use the format, which is set in $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].

This affects the dates in the tables
  • "User list"
  • "Active sessions" and
  • "Compare Backend Users" (which you see after clicking the "Compare user list" button)

Dates are handled with one and the same variable at 5 places:

In Partials/BackendUser/IndexListRow.html
<f:format.date format="{dateFormat} {timeFormat}">{backendUser.lastLoginDateAndTime}</f:format.date>

In Partials/BackendUser/OnlineListRow.html with these lines:
<f:format.date format="{dateFormat} {timeFormat}">{session.timestamp}</f:format.date>

And in Templates\BackendUser\Compare.html
Line 85: <f:format.date format="{dateFormat} {timeFormat}">{compareUser.startDateAndTime}</f:format.date> Line 100: <f:format.date format="{dateFormat} {timeFormat}">{compareUser.endDateAndTime}</f:format.date> Line 115: <f:format.date format="{dateFormat} {timeFormat}">{compareUser.lastLoginDateAndTime}</f:format.date>

Proposed solution:

The variable {dateFormat} should take the value from $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].


Files

Localized-dates.gif (16 KB) Localized-dates.gif Chris topher, 2013-06-26 21:59

Related issues 4 (1 open3 closed)

Related to TYPO3 Core - Bug #49401: Fix localization of the language moduleClosed2013-06-25

Actions
Related to TYPO3 Core - Bug #49402: Fix localization of the BE user moduleClosed2013-06-25

Actions
Related to TYPO3 Core - Bug #49404: Fix one language label in the extension managerClosed2013-06-25

Actions
Related to TYPO3 Core - Feature #51844: Fix date-format in edit-view of a recordAcceptedJo Hasenau2013-09-09

Actions
Actions #1

Updated by Jigal van Hemert almost 11 years ago

  • Category set to Backend User Interface
  • Status changed from New to Accepted
  • Complexity set to easy
Actions #2

Updated by Wouter Wolters almost 11 years ago

This is already the case and is set in BackendUserController for each action.

125 $this->view->assign('dateFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
126 $this->view->assign('timeFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']);

146 $this->view->assign('dateFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
147 $this->view->assign('timeFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']);

159 $this->view->assign('dateFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']);
160 $this->view->assign('timeFormat', $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']);

The problem here is that with the format given in these variables don't have a % character in them. So the DateViewHelper doesn't use strftime function to make them localized.

Actions #3

Updated by Chris topher almost 11 years ago

Ohh guys, I am so sorry: For me the dates in fact are localized. (But when you use a new installation and don't set $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], then this does not work...) Shame on me. :-(

What is the problem you mean, Wouter?

When you e.g. set $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] = 'd.m.Y'; then you get the display from the attached screenshot. I would call that working. :-/

Or did you mean something else?

Actions #4

Updated by Alexander Opitz over 10 years ago

Hi Wouter,

Christopher wrote a question to you, so I added you to the watchers list of this issue.

Actions #5

Updated by Wouter Wolters over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

Sorry for the late reply. I mixed things up here with the localization of the date format. This is the correct behaviour but as explained by Christopher the problem was on his side

Closing!

Actions

Also available in: Atom PDF