From 9da5dc229dc08453b582ee7d71fcfb1519293207 Mon Sep 17 00:00:00 2001 From: Jeff Schaller <17769792+jeffschaller@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:45:41 -0400 Subject: [PATCH] Update chatcommands.py replace datetime.utcnow() with datetime.now(datetime.UTC) --- chatcommands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatcommands.py b/chatcommands.py index 6d7c0a20eb..51cad9bf82 100644 --- a/chatcommands.py +++ b/chatcommands.py @@ -849,7 +849,7 @@ def wut(): def hats(): wb_start = datetime(2018, 12, 12, 0, 0, 0) wb_end = datetime(2019, 1, 2, 0, 0, 0) - now = datetime.utcnow() + now = datetime.now(datetime.UTC) return_string = "" if wb_start > now: diff = wb_start - now @@ -1421,7 +1421,7 @@ def status(): Returns the amount of time the application has been running :return: A string """ - now = datetime.utcnow() + now = datetime.now(datetime.UTC) diff = now - GlobalVars.startup_utc_date return 'Running since {time} UTC ({relative})'.format(time=GlobalVars.startup_utc, relative=td_format(diff))