From 17836fd225e0bedf5d9463000a6f86be243d13f9 Mon Sep 17 00:00:00 2001 From: Adrien CHARBONNEAU Date: Wed, 18 Oct 2023 19:04:25 +0200 Subject: [PATCH] Correction de l'indentation --- ACTUALITE/index.php | 47 ++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/ACTUALITE/index.php b/ACTUALITE/index.php index c1e2a66..d7595cd 100644 --- a/ACTUALITE/index.php +++ b/ACTUALITE/index.php @@ -43,36 +43,27 @@ Bonne lecture ! --> - - setTimezone(new \DateTimeZone('Europe/Paris')); - - return sprintf('%s', $commitDate->format('d/m/Y à H:i:s')); - } - } - - // echo 'Version du site : ' . Version::get(); - - ?> + } + class DateVersion { + public static function get() { + $commitDate = new \DateTime(trim(exec('git log -n1 --pretty=%ci index.php'))); + $commitDate->setTimezone(new \DateTimeZone('Europe/Paris')); + return sprintf('%s', $commitDate->format('d/m/Y à H:i:s')); + } + } + + // echo 'Version du site : ' . Version::get(); + +?> +