mirror of https://github.com/mvt-project/mvt.git
Returns empty string when no date in date converter
This commit is contained in:
parent
cbd41b2aff
commit
db6ed54879
|
@ -59,6 +59,9 @@ def convert_datetime_to_iso(date_time: datetime.datetime) -> str:
|
|||
:rtype: str
|
||||
|
||||
"""
|
||||
if not date_time:
|
||||
return ""
|
||||
|
||||
if date_time.tzinfo:
|
||||
# Timezone aware object - convert to UTC
|
||||
date_time = date_time.astimezone(tz=datetime.timezone.utc)
|
||||
|
|
Loading…
Reference in New Issue