Project

General

Profile

Actions

Bug #87819

closed

wrong format for date in drawOverrideModal dialog

Added by Rainer Plöckl over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend JavaScript
Target version:
-
Start date:
2019-03-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

the override dialog within the DragUpload.js shows two wrong dates:
[snip]
Original file
readme.txt (4.6 KB)
1970-01-18 23:57

Uploaded file
readme.txt (4.6 KB)
51075-06-26 08:46
[snip]

The first date for the "Original" File might be fixed, by changing the "x" to "X":
moment(askForOverride[i].original.mtime, 'X').format('YYYY-MM-DD HH:mm')
(https://forge.typo3.org/projects/typo3cms-core/repository/revisions/f7a1c3856875643ecf3e5e54baa51363fb2df989/entry/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js#L332)

The timestamp for the Uploaded file (askForOverride[i].uploaded.lastModified) looks like to be a Millisecond Timestamp so using:
moment(askForOverride[i].uploaded.lastModified, 'x').format('YYYY-MM-DD HH:mm')
(with a small "x") should solve this.
https://forge.typo3.org/projects/typo3cms-core/repository/revisions/f7a1c3856875643ecf3e5e54baa51363fb2df989/entry/typo3/sysext/backend/Resources/Public/JavaScript/DragUploader.js#L336

332c332
< '<br>' + moment(askForOverride[i].original.mtime, 'x').format('YYYY-MM-DD HH:mm')
---

'<br>' + moment(askForOverride[i].original.mtime, 'X').format('YYYY-MM-DD HH:mm')

336c336
< '<br>' + moment(askForOverride[i].uploaded.lastModified, 'X').format('YYYY-MM-DD HH:mm')
---

'<br>' + moment(askForOverride[i].uploaded.lastModified, 'x').format('YYYY-MM-DD HH:mm')


Files

Bildschirmfoto 2019-03-01 um 13.55.44.png (49.9 KB) Bildschirmfoto 2019-03-01 um 13.55.44.png sample screenshot Rainer Plöckl, 2019-03-01 14:36

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #94289: wrong date in drawOverrideModal dialog for original fileClosed2021-06-09

Actions
Is duplicate of TYPO3 Core - Bug #88081: Timestamp in replace dialog of file list is brokenClosedManuel Selbach2019-04-04

Actions
Actions

Also available in: Atom PDF