summaryrefslogtreecommitdiffstats
path: root/pykolab/xml/utils.py
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-03-04 12:02:41 -0500
committerThomas Bruederli <bruederli@kolabsys.com>2014-03-04 12:02:41 -0500
commit14a14d77a1178167614ad3bcac9e9dfe4d6e0372 (patch)
tree2cf76eb32d94f1888c8bb2f4b1e9770fc9fabceb /pykolab/xml/utils.py
parentc5ce78d75fe7d8325cf2467937bba7698db4eafc (diff)
downloadpykolab-14a14d77a1178167614ad3bcac9e9dfe4d6e0372.tar.gz
Import RRULE property from iCal
Diffstat (limited to 'pykolab/xml/utils.py')
-rw-r--r--pykolab/xml/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/xml/utils.py b/pykolab/xml/utils.py
index c4d123c..780932d 100644
--- a/pykolab/xml/utils.py
+++ b/pykolab/xml/utils.py
@@ -7,7 +7,7 @@ def to_dt(dt):
Convert a naive date or datetime to a tz-aware datetime.
"""
- if isinstance(dt, datetime.date) or not hasattr(dt, 'hour'):
+ if isinstance(dt, datetime.date) and not isinstance(dt, datetime.datetime) or not hasattr(dt, 'hour'):
dt = datetime.datetime(dt.year, dt.month, dt.day, 0, 0, 0, 0)
else: