From 494fe274b08f3ee3e5c5856aa7598f251149c891 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 10 Sep 2025 17:43:37 +0300 Subject: [PATCH] sort as strings --- src/Appwrite/Platform/Workers/StatsResources.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Workers/StatsResources.php b/src/Appwrite/Platform/Workers/StatsResources.php index d26f4c06f3..932b5072f9 100644 --- a/src/Appwrite/Platform/Workers/StatsResources.php +++ b/src/Appwrite/Platform/Workers/StatsResources.php @@ -444,9 +444,8 @@ class StatsResources extends Action $cmp = strcmp($a['period'], $b['period']); if ($cmp !== 0) return $cmp; - // time ASC - if ($a['time'] === $b['time']) return 0; - return ($a['time'] < $b['time']) ? -1 : 1; + // time ASC (string comparison is fine) + return strcmp($a['time'], $b['time']); }); try {