mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fix: use receivedAt date when available
This commit is contained in:
parent
32329ef3f9
commit
5d61544444
1 changed files with 5 additions and 1 deletions
|
|
@ -142,7 +142,11 @@ class StatsUsageDump extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->periods as $period => $format) {
|
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}");
|
$id = \md5("{$time}_{$period}_{$key}");
|
||||||
|
|
||||||
$document = new Document([
|
$document = new Document([
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue