From fa39a68353c8ad8953eb518a89a5f8be181a7a0c Mon Sep 17 00:00:00 2001 From: Jeff Schaller <17769792+jeffschaller@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:27:55 -0400 Subject: [PATCH] Update chatcommands.py --- chatcommands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chatcommands.py b/chatcommands.py index 51cad9bf82..3afc87ed64 100644 --- a/chatcommands.py +++ b/chatcommands.py @@ -7,7 +7,7 @@ from globalvars import GlobalVars import findspam # noinspection PyUnresolvedReferences -from datetime import datetime +from datetime import datetime, timezone from apigetpost import api_get_post, PostData import datahandling from datahandling import * @@ -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.now(datetime.UTC) + now = datetime.now(tz=timezone.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.now(datetime.UTC) + now = datetime.now(tz=timezone.utc) diff = now - GlobalVars.startup_utc_date return 'Running since {time} UTC ({relative})'.format(time=GlobalVars.startup_utc, relative=td_format(diff))