From d4599e68849b08345da2c670ce56ccbfd8081af0 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 13 Feb 2025 06:43:49 +0000 Subject: [PATCH] Fix, time was not being written to DB --- src/Appwrite/Platform/Workers/StatsResources.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index 639e90a867..f5e3d26b2a 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -354,10 +354,11 @@ class StatsResources extends Action 'period' => $period, 'region' => $region, 'value' => $value, + 'time' => $time, ]); } } else { - $time = 'inf' === $period ? null : \date($this->periods[$period], \time()); + $time = $period === 'inf' ? null : \date($this->periods[$period], \time()); $id = \md5("{$time}_{$period}_{$metric}"); $this->documents[] = new Document([ '$id' => $id, @@ -365,6 +366,7 @@ class StatsResources extends Action 'period' => $period, 'region' => $region, 'value' => $value, + 'time' => $time, ]); } }