Show date time in local (not server) timezone on Help > System Status page

Related to #5650

[MAILPOET-5755]
This commit is contained in:
 Ján Mikláš
2024-06-18 15:32:01 +02:00
committed by Ján Mikláš
parent 4805e611e7
commit 3f6210c7ed

View File

@@ -31,18 +31,27 @@ function TasksListDataRow({
let scheduled: Date; let scheduled: Date;
if (showScheduledAt) { if (showScheduledAt) {
scheduled = parseDate(task.scheduledAt, 'yyyy-MM-dd HH:mm:ss', new Date()); scheduled = parseDate(task.scheduledAt, 'yyyy-MM-dd HH:mm:ss', new Date());
if (scheduled) {
scheduled = MailPoet.Date.adjustForTimezoneDifference(scheduled);
}
} }
let cancelled: Date; let cancelled: Date;
if (showCancelledAt) { if (showCancelledAt) {
cancelled = parseDate(task.cancelledAt, 'yyyy-MM-dd HH:mm:ss', new Date()); cancelled = parseDate(task.cancelledAt, 'yyyy-MM-dd HH:mm:ss', new Date());
if (cancelled) {
cancelled = MailPoet.Date.adjustForTimezoneDifference(cancelled);
}
} }
const updated: Date = parseDate( let updated: Date = parseDate(
task.updatedAt, task.updatedAt,
'yyyy-MM-dd HH:mm:ss', 'yyyy-MM-dd HH:mm:ss',
new Date(), new Date(),
); );
if (updated) {
updated = MailPoet.Date.adjustForTimezoneDifference(updated);
}
return ( return (
<tr> <tr>