From 270af068683911115a73596db0a8bbd167b82eda Mon Sep 17 00:00:00 2001 From: gravel Date: Tue, 24 Jan 2023 21:49:26 +0100 Subject: [PATCH] Generate last checked timestamp --- .phpenv | 2 ++ output/main.js | 2 +- sites/index.php | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.phpenv b/.phpenv index 309b041..3c59c08 100644 --- a/.phpenv +++ b/.phpenv @@ -16,4 +16,6 @@ // do not report warnings (timeouts, SSL/TLS errors) error_reporting(E_ALL & ~E_WARNING); + + date_default_timezone_set('UTC'); ?> \ No newline at end of file diff --git a/output/main.js b/output/main.js index 5580094..25ae17b 100644 --- a/output/main.js +++ b/output/main.js @@ -131,7 +131,7 @@ function setLastChecked(last_checked) { const time_passed_in_minutes = Math.floor(time_passed_in_seconds / 60); // time in minutes, rounded down const timestamp_element = dom.last_checked(); - timestamp_element.innerText = `${time_passed_in_minutes} minutes`; + timestamp_element.innerText = `${time_passed_in_minutes} minutes ago`; } /** diff --git a/sites/index.php b/sites/index.php index 2555bb8..24f6478 100644 --- a/sites/index.php +++ b/sites/index.php @@ -42,7 +42,9 @@ (None hidden as JS is off)

- Last checked ago. + Last checked + (UTC) + .

This site is not affiliated with