From 3fffcf86c9fe8a8db5bf1bb72031afc79e623c26 Mon Sep 17 00:00:00 2001 From: Emily Doherty Date: Mon, 16 Dec 2024 14:45:36 -0800 Subject: [PATCH] Format timestamps to be in local time zone provided by Discord --- token_bot/tracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/token_bot/tracker.py b/token_bot/tracker.py index 17ddbaf..04bb285 100644 --- a/token_bot/tracker.py +++ b/token_bot/tracker.py @@ -317,7 +317,7 @@ class Tracker(Extension): return ( f"Last Price Value for {region}: {format(region_history.last_price_datum[1], ",")}\n" - f"Last Update Time: {region_history.last_price_datum[0].strftime('%Y-%m-%d %H:%M:%S UTC')}\n" + f"Last Update Time: local time\n" f"Last Price Movement: {price_movement_str}" ) @@ -494,7 +494,7 @@ class Tracker(Extension): if trigger.last_trigger is not None: alert_str = ( f"Last Alerting Price Value: {format(trigger.last_alerting[1], ",")}\n" - f"Last Alerting Time: {trigger.last_alerting[0].strftime('%Y-%m-%d %H:%M:%S UTC')}\n" + f"Last Alerting Time: local time\n" f"[Link to this Chart]({self._render_token_url(alert)})\n" ) if user is not None and user.user_id == 265678699435655169: