--- a/src/ztfy/utils/date.py Mon Apr 03 14:47:40 2023 +0200
+++ b/src/ztfy/utils/date.py Wed Jan 24 13:54:47 2024 +0100
@@ -15,7 +15,7 @@
# import standard packages
-from datetime import datetime
+from datetime import date, datetime, time
# import Zope3 interfaces
@@ -87,7 +87,10 @@
if request is None:
request = queryRequest()
if value.year >= 1900:
- return datetime.strftime(tztime(value), translate(format, context=request).encode('utf-8')).decode('utf-8')
+ if isinstance(value, date):
+ value = datetime.combine(value, time())
+ return datetime.strftime(tztime(value),
+ translate(format, context=request).encode('utf-8')).decode('utf-8')
else:
return format.replace('%d', str(value.day)) \
.replace('%m', str(value.month)) \