mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +00:00
sort as strings
This commit is contained in:
parent
5820bae097
commit
494fe274b0
1 changed files with 2 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue