Fix: use receivedAt date when available

This commit is contained in:
Damodar Lohani 2025-03-04 05:31:35 +00:00
parent 32329ef3f9
commit 5d61544444

View file

@ -142,7 +142,11 @@ class StatsUsageDump extends Action
}
foreach ($this->periods as $period => $format) {
$time = 'inf' === $period ? null : date($format, time());
$time = null;
if ($period !== 'inf') {
$time = $receivedAt !== 'NONE' ? (new \DateTime($receivedAt))->format($format) : date($format, time());
}
$id = \md5("{$time}_{$period}_{$key}");
$document = new Document([