Bug #87819
closedwrong format for date in drawOverrideModal dialog
0%
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
Updated by Georg Ringer over 5 years 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.
Updated by Georg Ringer over 5 years ago
- Is duplicate of Bug #88081: Timestamp in replace dialog of file list is broken added
Updated by Georg Ringer 5 months ago
- Related to Bug #94289: wrong date in drawOverrideModal dialog for original file added