always save activities to UTC date

This commit is contained in:
Jean-Christian 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_action', $action);
$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->insert();
@ -427,7 +427,7 @@ class ActivityReport
$cur->setField('activity_group', My::id());
$cur->setField('activity_action', 'message');
$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->insert();