From dd7031ff19301f3913ca1b4f9560a96766171c27 Mon Sep 17 00:00:00 2001 From: profitroll Date: Wed, 25 Jan 2023 15:59:54 +0100 Subject: [PATCH] Changed DT method to fix UTC time --- extensions/saves.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/saves.py b/extensions/saves.py index abbf73b..4ea461b 100644 --- a/extensions/saves.py +++ b/extensions/saves.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import datetime, timezone from urllib.parse import quote_plus from os import remove from typing import Dict, List, Literal, Union @@ -182,7 +182,7 @@ async def saves_post(device: str, files: List[UploadFile], apikey: APIKey = Depe zipped = zip_saves(save_data_filename, save_data_file, save_info_file) - save_date = int(datetime.utcnow().timestamp()) + save_date = int(datetime.now(tz=timezone.utc).timestamp()) index = { "id": int(save_data["SaveGame"]["uniqueIDForThisGame"]),