misc: replace uses of pytz.utc with timezone.utc where it makes sense

This commit is contained in:
Dima Gerasimov 2023-06-09 03:04:54 +01:00 committed by karlicoss
parent c91534b966
commit c12224af74
9 changed files with 24 additions and 42 deletions

View file

@ -17,13 +17,11 @@ from .core.cfg import make_config
config = make_config(lastfm)
from datetime import datetime
from datetime import datetime, timezone
import json
from pathlib import Path
from typing import NamedTuple, Sequence, Iterable
import pytz
from .core.common import mcachew, Json, get_files
@ -44,7 +42,7 @@ class Scrobble(NamedTuple):
@property
def dt(self) -> datetime:
ts = int(self.raw['date'])
return datetime.fromtimestamp(ts, tz=pytz.utc)
return datetime.fromtimestamp(ts, tz=timezone.utc)
@property
def artist(self) -> str: