From d2eeca12325811e31da3dd0f3c757d1bb28e719f Mon Sep 17 00:00:00 2001 From: plsdoant Date: Sat, 10 Jan 2026 21:54:01 -0800 Subject: [PATCH 1/2] added a timestamp when hovering over history of status, changed timezone to PST --- system_status/server.py | 5 ++++- system_status/templates/my_template.html | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/system_status/server.py b/system_status/server.py index 49a24c5..b3d102e 100644 --- a/system_status/server.py +++ b/system_status/server.py @@ -125,7 +125,10 @@ def get_prometheus_data() -> list[PrometheusData]: timestamps_and_values = [] for epoch_time, value in maybe_values: - timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(epoch_time)) + utc_dt = datetime.datetime.fromtimestamp(epoch_time, datetime.timezone.utc) + pst_tz = ZoneInfo("America/Los_Angeles") + pst_dt = utc_dt.astimezone(pst_tz) + timestamp = pst_dt.strftime("%Y-%m-%d %H:%M:%S") timestamps_and_values.append(TimestampAndValuePair(timestamp, value)) # the service is up if the maximum timestamp's value is "1" diff --git a/system_status/templates/my_template.html b/system_status/templates/my_template.html index 44a2049..e0d7a19 100644 --- a/system_status/templates/my_template.html +++ b/system_status/templates/my_template.html @@ -122,11 +122,13 @@

Fetch Time: {{ fetch_time }}

{# THIS IS THE CORRECTED SECTION for the EMOJI HISTORY #} {% for value in item.values %} + {% if value.value == "1" %} ✅ {% else %} ❌ {% endif %} + {# the below if-statement adds a vertical line for every four entries #} {% if (not loop.index % 4) and loop.index < 24%} | From 7642e4eb4bbb5e16deb53acb3f37362d654452aa Mon Sep 17 00:00:00 2001 From: plsdoant Date: Mon, 12 Jan 2026 14:26:04 -0800 Subject: [PATCH 2/2] add timezone to hover element --- system_status/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_status/server.py b/system_status/server.py index b3d102e..d5493d4 100644 --- a/system_status/server.py +++ b/system_status/server.py @@ -128,7 +128,7 @@ def get_prometheus_data() -> list[PrometheusData]: utc_dt = datetime.datetime.fromtimestamp(epoch_time, datetime.timezone.utc) pst_tz = ZoneInfo("America/Los_Angeles") pst_dt = utc_dt.astimezone(pst_tz) - timestamp = pst_dt.strftime("%Y-%m-%d %H:%M:%S") + timestamp = pst_dt.strftime("%Y-%m-%d %H:%M:%S %Z") timestamps_and_values.append(TimestampAndValuePair(timestamp, value)) # the service is up if the maximum timestamp's value is "1"