* recreate date functions from javascript in new class DateTime
 * move date and time functions from Util to new class
 * fixes various cooldown messages for account recovery
This commit is contained in:
Sarjuuk
2025-11-14 17:00:18 +01:00
parent 1fe3690244
commit f5654ae21f
36 changed files with 409 additions and 188 deletions

View File

@@ -228,9 +228,9 @@ class TemplateResponse extends BaseResponse
{
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
$stats['time'] = Util::formatTime((microtime(true) - self::$time) * 1000, true);
$stats['sql'] = ['count' => parent::$sql['count'], 'time' => Util::formatTime(parent::$sql['time'] * 1000, true)];
$stats['cache'] = !empty(static::$cacheStats) ? [static::$cacheStats[0], Util::formatTimeDiff(static::$cacheStats[1])] : null;
$stats['time'] = DateTime::formatTimeElapsed((microtime(true) - self::$time) * 1000);
$stats['sql'] = ['count' => parent::$sql['count'], 'time' => DateTime::formatTimeElapsed(parent::$sql['time'] * 1000)];
$stats['cache'] = !empty(static::$cacheStats) ? [static::$cacheStats[0], (new DateTime())->formatDate(static::$cacheStats[1])] : null;
}
else
$stats = [];