Use Mountain Time for all timestamps and dates

This commit is contained in:
2026-04-13 01:15:25 +00:00
parent f50355a818
commit 90cf0992b8
+6 -3
View File
@@ -8,9 +8,12 @@ Logs run to the Agent Dashboard API.
import json import json
import os import os
import sys import sys
from datetime import datetime, timezone from datetime import datetime, timezone, timedelta
from zoneinfo import ZoneInfo
from urllib import request, error, parse from urllib import request, error, parse
MT = ZoneInfo("America/Denver")
# --- Config --- # --- Config ---
DASHBOARD_API = os.environ.get("DASHBOARD_API", "http://localhost:8550") DASHBOARD_API = os.environ.get("DASHBOARD_API", "http://localhost:8550")
AGENT_ID = "weather-briefing" AGENT_ID = "weather-briefing"
@@ -65,7 +68,7 @@ def fetch_weather():
def format_briefing(weather): def format_briefing(weather):
"""Format weather data into markdown.""" """Format weather data into markdown."""
now = datetime.now() now = datetime.now(MT)
date_str = now.strftime("%A, %B %d, %Y") date_str = now.strftime("%A, %B %d, %Y")
current = weather["current"] current = weather["current"]
@@ -186,7 +189,7 @@ def main():
weather = fetch_weather() weather = fetch_weather()
print("Formatting briefing...") print("Formatting briefing...")
date_str = datetime.now().strftime("%Y-%m-%d") date_str = datetime.now(MT).strftime("%Y-%m-%d")
markdown, summary = format_briefing(weather) markdown, summary = format_briefing(weather)
print("Posting to wiki...") print("Posting to wiki...")