From d0ee343b45e902cbb8aee39ce3bf102c9f8c207b Mon Sep 17 00:00:00 2001 From: thopic Date: Tue, 4 Jul 2023 17:06:20 +0200 Subject: [PATCH 1/2] Use last commit date instead of unix mtime * simplify last website mtime script * link appropriate commit to last mtime --- html/includes/mtime.php | 7 +++---- html/index.php | 15 ++++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/html/includes/mtime.php b/html/includes/mtime.php index 55cd20b..99706f6 100644 --- a/html/includes/mtime.php +++ b/html/includes/mtime.php @@ -1,6 +1,5 @@ -

Mis à jour le

+

Dernière mise à jour

diff --git a/html/index.php b/html/index.php index 2c0ee97..64a9469 100644 --- a/html/index.php +++ b/html/index.php @@ -1,26 +1,23 @@ $mtime_this_file) { //si la date maximum n'est pas celle de cette page (index.php), alors cela veut dire qu'une page a été modifiée plus récemment - $mtime_this_file = $mtime_max; - } - $mtime_this_file = date("d M Y H:i:s", $mtime_this_file); //formatage de la date retenue + $mtime_max = date("d M Y H:i:s", $mtime_max); //formatage de la date retenue ?> @@ -34,7 +31,7 @@
-

Dernière mise à jour du site le
git revision:

+

Dernière mise à jour du site le
git revision:

-- 2.45.2 From 95a18a949a04f63792b476123c2f2da821bd0c3b Mon Sep 17 00:00:00 2001 From: thopic Date: Wed, 12 Jul 2023 16:40:59 +0200 Subject: [PATCH 2/2] give deprecated function up + postpone git relative date format use * replace strftime() by datefmt_create() and datefmt_format() (formats:https://unicode-org.github.io/icu/userguide/format_parse/datetime/) * postpone due to issue with git output locale in docker container --- html/includes/mtime.php | 12 ++++++++++-- html/index.php | 17 +++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/html/includes/mtime.php b/html/includes/mtime.php index 99706f6..fac409b 100644 --- a/html/includes/mtime.php +++ b/html/includes/mtime.php @@ -1,5 +1,13 @@ -

Dernière mise à jour

+

Mis à jour le

diff --git a/html/index.php b/html/index.php index 64a9469..c8993c2 100644 --- a/html/index.php +++ b/html/index.php @@ -1,13 +1,10 @@ @@ -31,7 +36,7 @@
-

Dernière mise à jour du site le
git revision:

+

Dernière mise à jour du site le
git revision:

-- 2.45.2