From 069264ce52046d0feeee9fd46850339354256900 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sat, 10 Aug 2024 19:28:28 +0300 Subject: [PATCH] core.common: get rid of deprecated utcfromtimestamp --- my/core/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/core/common.py b/my/core/common.py index f7bb0104..98dbacb8 100644 --- a/my/core/common.py +++ b/my/core/common.py @@ -511,10 +511,10 @@ def stat_item(item): def test_stat_iterable() -> None: - from datetime import datetime, timedelta + from datetime import datetime, timedelta, timezone from typing import NamedTuple - dd = datetime.utcfromtimestamp(123) + dd = datetime.fromtimestamp(123, tz=timezone.utc) day = timedelta(days=3) X = NamedTuple('X', [('x', int), ('d', datetime)])