From c985d23c52b541e5a5d0dcf2c3f3a0629cee23f9 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 30 Aug 2023 16:18:31 +0900 Subject: [PATCH] extension update time, convert to system time zone --- modules/ui_extensions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui_extensions.py b/modules/ui_extensions.py index fa831f570..2e8c1d6d2 100644 --- a/modules/ui_extensions.py +++ b/modules/ui_extensions.py @@ -2,7 +2,7 @@ import json import os import threading import time -from datetime import datetime +from datetime import datetime, timezone import git @@ -442,7 +442,7 @@ sort_ordering = [ def get_date(info: dict, key): try: - return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").strftime("%Y-%m-%d") + return datetime.strptime(info.get(key), "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc).astimezone().strftime("%Y-%m-%d") except (ValueError, TypeError): return ''