--- a/src/ztfy/utils/timezone/__init__.py Wed May 15 10:27:05 2013 +0200
+++ b/src/ztfy/utils/timezone/__init__.py Wed May 15 10:28:22 2013 +0200
@@ -17,7 +17,7 @@
# import standard packages
import pytz
-from datetime import date
+from datetime import datetime
# import Zope3 interfaces
from zope.interface.common.idatetime import ITZInfo
@@ -49,7 +49,7 @@
def tztime(value):
if not value:
return None
- if isinstance(value, date):
+ if not isinstance(value, datetime):
return value
if not value.tzinfo:
value = GMT.localize(value)
@@ -59,7 +59,7 @@
def gmtime(value):
if not value:
return None
- if isinstance(value, date):
+ if not isinstance(value, datetime):
return value
if not value.tzinfo:
value = GMT.localize(value)