* Notifications: Fix notifications displayed time was not base on user timezone

This commit is contained in:
Hadi Nategh 2020-08-28 11:59:37 +02:00
parent 6b5414904f
commit 10f40c9dbb
2 changed files with 4 additions and 4 deletions

View File

@ -210,8 +210,8 @@ class notifications_ajax {
'id' => $notification['notify_id'],
'message' => $notification['notify_message'],
'status' => $notification['notify_status'],
'created' => Api\DateTime::to($notification['notify_created']),
'current' => new DateTime(),
'created' => Api\DateTime::server2user($notification['notify_created']),
'current' => new Api\DateTime('now'),
'actions' => is_array($actions)?$actions:NULL,
'extra_data' => ($data['data'] ? $data['data'] : array())
);

View File

@ -161,8 +161,8 @@ class notifications_popup implements notifications_iface {
'id' => $notification['notify_id'],
'message' => $notification['notify_message'],
'status' => $notification['notify_status'],
'created' => Api\DateTime::to($notification['notify_created']),
'current' => new DateTime(),
'created' => Api\DateTime::server2user($notification['notify_created']),
'current' => new Api\DateTime('now'),
'actions' => is_array($actions)?$actions:NULL,
'extra_data' => ($data['data'] ? $data['data'] : array())
);