ldap: format_date & parse_date: consider naive date as default

This commit is contained in:
Benjamin Renard 2021-05-26 11:55:16 +02:00
parent 6bbacce38a
commit f44006535b

View file

@ -359,7 +359,7 @@ def parse_datetime(value, to_timezone=None, default_timezone=None, naive=None):
return date 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 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 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 Convert datetime.date object to LDAP date string