From 28ee5e46a55e4bb65156605a518712d59c37325c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 3 Feb 2024 09:55:38 +0100 Subject: [PATCH] =?UTF-8?q?14.1.19=20temps=20pass=C3=A9=20sur=20un=20espac?= =?UTF-8?q?e=20en=20jours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/module/course/course.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/core.php b/core/core.php index 9c7f343..8b387a0 100644 --- a/core/core.php +++ b/core/core.php @@ -51,7 +51,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.4.18'; + const ZWII_VERSION = '1.4.19'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; diff --git a/core/module/course/course.php b/core/module/course/course.php index fe09b18..222a28f 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -1168,9 +1168,13 @@ class course extends common self::$userStat['floor'] = helper::dateUTF8('%d %B %Y %H:%M', $floorTime); self::$userStat['top'] = helper::dateUTF8('%d %B %Y %H:%M', $topTime); $d = $topTime - $floorTime; - $d_hours = floor($d / 3600); + // Conversion de la différence en jours, heures et minutes + $d_days = floor($d / 86400); // 1 jour = 86400 secondes (24 heures * 60 minutes * 60 secondes) + $d_hours = floor(($d % 86400) / 3600); $d_minutes = floor(($d % 3600) / 60); - self::$userStat['time'] = $d_hours . ' heures, ' . $d_minutes . ' minutes '; + + // Affichage du résultat + self::$userStat['time'] = $d_days . ' jours, ' . $d_hours . ' heures, ' . $d_minutes . ' minutes '; // Valeurs en sortie $this->addOutput([