From d58f61770463aab2c71464c11f902f0074b49b62 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 15 Jan 2024 15:50:43 +0100 Subject: http catch-up --- src/View.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/View.php') diff --git a/src/View.php b/src/View.php index 10ce9db..761ef62 100644 --- a/src/View.php +++ b/src/View.php @@ -25,6 +25,10 @@ class View // self::$twig->addExtension(new IntlExtension()); self::$twig->addFilter(new TwigFilter('buildTime', function ($buildTime) { + if ($buildTime > 3600*24) { + return @sprintf('%02d:%02d:%02d:%02d', $buildTime / (3600*24), $buildTime / 3600, ($buildTime / 60) % 60, $buildTime % 60); + } + return @sprintf('%02d:%02d:%02d', $buildTime / 3600, ($buildTime / 60) % 60, $buildTime % 60); })); } -- cgit v1.2.3