always save activities to UTC date

This commit is contained in:
Jean-Christian Paul Denis 2023-05-13 00:13:48 +02:00
parent edbc2e5b8c
commit 7b0460f23b
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951

View File

@ -249,7 +249,7 @@ class ActivityReport
$cur->setField('activity_group', $group); $cur->setField('activity_group', $group);
$cur->setField('activity_action', $action); $cur->setField('activity_action', $action);
$cur->setField('activity_logs', json_encode($logs)); $cur->setField('activity_logs', json_encode($logs));
$cur->setField('activity_dt', date('Y-m-d H:i:s')); $cur->setField('activity_dt', Date::str('%Y-%m-%d %H:%M:%S', time(), 'UTC'));
$cur->setField('activity_status', self::STATUS_PENDING); $cur->setField('activity_status', self::STATUS_PENDING);
$cur->insert(); $cur->insert();
@ -427,7 +427,7 @@ class ActivityReport
$cur->setField('activity_group', My::id()); $cur->setField('activity_group', My::id());
$cur->setField('activity_action', 'message'); $cur->setField('activity_action', 'message');
$cur->setField('activity_logs', json_encode([__('Activity report deletes some old logs.')])); $cur->setField('activity_logs', json_encode([__('Activity report deletes some old logs.')]));
$cur->setField('activity_dt', date('Y-m-d H:i:s')); $cur->setField('activity_dt', Date::str('%Y-%m-%d %H:%M:%S', time(), 'UTC'));
$cur->setField('activity_status', self::STATUS_PENDING); $cur->setField('activity_status', self::STATUS_PENDING);
$cur->insert(); $cur->insert();