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))