misc: replace uses of pytz.utc with timezone.utc where it makes sense
This commit is contained in:
parent
f38a21ba41
commit
dba1fb64ee
9 changed files with 24 additions and 42 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue