Update uses of recordclass and utcfromtimestamp()
This commit is contained in:
@@ -46,7 +46,7 @@ class SchemaFieldSerializer(abc.ABC, Generic[_T]):
|
||||
class SchemaDate(SchemaFieldSerializer[dt.datetime]):
|
||||
@classmethod
|
||||
def deserialize(cls, val: str) -> dt.datetime:
|
||||
return dt.datetime.utcfromtimestamp(int(val))
|
||||
return dt.datetime.fromtimestamp(int(val), dt.timezone.utc)
|
||||
|
||||
@classmethod
|
||||
def serialize(cls, val: dt.datetime) -> str:
|
||||
@@ -54,7 +54,7 @@ class SchemaDate(SchemaFieldSerializer[dt.datetime]):
|
||||
|
||||
@classmethod
|
||||
def from_llsd(cls, val: Any, flavor: str) -> dt.datetime:
|
||||
return dt.datetime.utcfromtimestamp(val)
|
||||
return dt.datetime.fromtimestamp(val, dt.timezone.utc)
|
||||
|
||||
@classmethod
|
||||
def to_llsd(cls, val: dt.datetime, flavor: str):
|
||||
|
||||
@@ -58,7 +58,7 @@ pyperclip==1.8.2
|
||||
PySide6-Essentials==6.6.1
|
||||
python-dateutil==2.8.2
|
||||
qasync==0.27.1
|
||||
recordclass==0.18.2
|
||||
recordclass==0.23.1
|
||||
ruamel.yaml==0.18.5
|
||||
ruamel.yaml.clib==0.2.8
|
||||
service-identity==23.1.0
|
||||
|
||||
Reference in New Issue
Block a user