Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion system_status/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 %Z")
timestamps_and_values.append(TimestampAndValuePair(timestamp, value))

# the service is up if the maximum timestamp's value is "1"
Expand Down
2 changes: 2 additions & 0 deletions system_status/templates/my_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ <h2 id="fetch_time">Fetch Time: {{ fetch_time }}</h2>
{# THIS IS THE CORRECTED SECTION for the EMOJI HISTORY #}
<td>
{% for value in item.values %}
<span title="{{value.timestamp}}" style="cursor: help">
{% if value.value == "1" %}
{% else %}
{% endif %}
</span>
{# the below if-statement adds a vertical line for every four entries #}
{% if (not loop.index % 4) and loop.index < 24%}
|
Expand Down