Display the updated_at field using the site timezone

This commit changes the logic to display the updated_at field for tasks
in the system status page to use the site timezone.

[MAILPOET-3692]
This commit is contained in:
Rodrigo Primo
2021-09-15 12:14:09 -03:00
committed by Veljko V
parent 9acfe4fbee
commit a25a6db1f5
3 changed files with 7 additions and 5 deletions

View File

@@ -7,7 +7,6 @@ use MailPoet\Models\Newsletter;
use MailPoet\Models\ScheduledTask;
use MailPoet\Models\SendingQueue;
use MailPoet\Newsletter\Url as NewsletterUrl;
use MailPoetVendor\Carbon\Carbon;
class State {
/** @var NewsletterUrl */
@@ -91,7 +90,7 @@ class State {
'id' => (int)$task->id,
'type' => $task->type,
'priority' => (int)$task->priority,
'updated_at' => Carbon::createFromTimeString((string)$task->updatedAt)->timestamp,
'updated_at' => $task->updatedAt,
'scheduled_at' => $task->scheduledAt ? $task->scheduledAt : null,
'status' => $task->status,
'newsletter' => (($queue instanceof SendingQueue) && ($newsletter instanceof Newsletter)) ? [