From 06b8366fab1cc1acaba758721f104eab695dacd2 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 7 Apr 2022 12:48:02 +0200 Subject: [PATCH] feat(api): fixed /templates time conversion --- api/chalicelib/utils/TimeUTC.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/chalicelib/utils/TimeUTC.py b/api/chalicelib/utils/TimeUTC.py index bac7a027f..7befebb27 100644 --- a/api/chalicelib/utils/TimeUTC.py +++ b/api/chalicelib/utils/TimeUTC.py @@ -95,6 +95,8 @@ class TimeUTC: def datetime_to_timestamp(date): if date is None: return None + if isinstance(date, str): + return TimeUTC.human_to_timestamp(date, "%Y-%m-%dT%H:%M:%S.%f") return int(datetime.timestamp(date) * 1000) @staticmethod