Bug #87819

wrong format for date in drawOverrideModal dialog

Added by Rainer Plöckl 12 months ago. Updated 10 months ago.

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

0%

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')

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


Related issues

Duplicates TYPO3 Core - Bug #88081: Timestamp in replace dialog of file list is broken Closed 2019-04-04

History

#1 Updated by Georg Ringer 10 months ago

  • Status changed from New to Closed

thanks for creating the issue. IMO this has been solved in the meantime with #88081, therefore I am closing this issue.

#2 Updated by Georg Ringer 10 months ago

  • Duplicates Bug #88081: Timestamp in replace dialog of file list is broken added

Also available in: Atom PDF