[API] change dates to ISO format

This commit is contained in:
Simon 2023-07-28 15:56:59 +07:00
parent 865089d46d
commit ef0d490890
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4

View File

@ -91,7 +91,7 @@ def date_praser(timestamp: int | str) -> str:
elif isinstance(timestamp, str): elif isinstance(timestamp, str):
date_obj = datetime.strptime(timestamp, "%Y-%m-%d") date_obj = datetime.strptime(timestamp, "%Y-%m-%d")
return datetime.strftime(date_obj, "%d %b, %Y") return date_obj.date().isoformat()
def time_parser(timestamp: str) -> float: def time_parser(timestamp: str) -> float: