mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-23 05:34:28 +00:00
9 lines
201 B
Python
9 lines
201 B
Python
|
from datetime import datetime
|
||
|
from datetime import timezone
|
||
|
|
||
|
from dateutil.parser import isoparse
|
||
|
|
||
|
|
||
|
def parse_isoformat(isodate: str) -> datetime:
|
||
|
return isoparse(isodate).astimezone(timezone.utc)
|