From 663a1c20e6ba0fbf65afcb43f0f48d34f21dcb53 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 Jul 2015 21:22:31 -0400 Subject: Add new analytic page: Average time spent into each column --- app/Helper/Dt.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/Helper') diff --git a/app/Helper/Dt.php b/app/Helper/Dt.php index be595605..b338fdc8 100644 --- a/app/Helper/Dt.php +++ b/app/Helper/Dt.php @@ -21,6 +21,10 @@ class Dt extends \Core\Base */ public function duration($seconds) { + if ($seconds == 0) { + return 0; + } + $dtF = new DateTime("@0"); $dtT = new DateTime("@$seconds"); return $dtF->diff($dtT)->format('%a days, %h hours, %i minutes and %s seconds'); -- cgit v1.2.3