--- a/ztfy/utils/timezone.py Tue Mar 02 23:34:27 2010 +0100
+++ b/ztfy/utils/timezone.py Tue Mar 02 23:34:55 2010 +0100
@@ -16,8 +16,8 @@
$Id: $
"""
-__version__ = "$Revision: $"
-__release__ = "$Id: $"
+__version__ = "$Revision: $"
+__release__ = "$Id: $"
__docformat__ = "restructuredtext"
# import standard packages
@@ -43,16 +43,20 @@
@implementer(ITZInfo)
@adapter(IBrowserRequest)
def tzinfo(request=None):
- return tz
+ return tz
def tztime(value):
+ if not value:
+ return None
if not value.tzinfo:
value = GMT.localize(value)
return value.astimezone(tz)
def gmtime(value):
+ if not value:
+ return None
if not value.tzinfo:
value = GMT.localize(value)
return value.astimezone(GMT)