mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Parse Message.date as date & update DateTimeField.
This commit is contained in:
parent
b3661aea27
commit
3e505a653b
2 changed files with 3 additions and 2 deletions
|
|
@ -164,5 +164,5 @@ class DateTimeField(BaseField):
|
|||
def serialize(self, value: datetime.datetime):
|
||||
return round(value.timestamp())
|
||||
|
||||
def deserialize(self, value):
|
||||
def deserialize(self, value, parent=None):
|
||||
return datetime.datetime.fromtimestamp(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue