From f44006535b26205620c791853ec4ac7b59505a41 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 26 May 2021 11:55:16 +0200 Subject: [PATCH] ldap: format_date & parse_date: consider naive date as default --- mylib/ldap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mylib/ldap.py b/mylib/ldap.py index 383ec35..e48f1b3 100644 --- a/mylib/ldap.py +++ b/mylib/ldap.py @@ -359,7 +359,7 @@ def parse_datetime(value, to_timezone=None, default_timezone=None, naive=None): return date -def parse_date(value, to_timezone=None, default_timezone=None, naive=None): +def parse_date(value, to_timezone=None, default_timezone=None, naive=True): """ Convert LDAP date string to datetime.date object @@ -414,7 +414,7 @@ def format_datetime(value, from_timezone=None, to_timezone=None, naive=None): return datestring -def format_date(value, from_timezone=None, to_timezone=None, naive=None): +def format_date(value, from_timezone=None, to_timezone=None, naive=True): """ Convert datetime.date object to LDAP date string