Commit 840e3313 authored by Andreas Jung's avatar Andreas Jung

- Collector #279: changed exception handling for safegmtime() to

        provide a more intuitive traceback for operating systems with a
        limited gmtime() implementations
parent b1a3e1d6
......@@ -81,6 +81,11 @@ Zope Changes
- Collector #278: DocumentWithImages could not handle URLs with
underscores
- Collector #279: changed exception handling for safegmtime() to
provide a more intuitive traceback for operating systems with a
limited gmtime() implementations
Zope 2.5.1 beta 1
Bugs Fixed
......
......@@ -12,7 +12,7 @@
##############################################################################
"""Encapsulation of date/time values"""
__version__='$Revision: 1.77 $'[11:-2]
__version__='$Revision: 1.78 $'[11:-2]
import re,sys, os, math, DateTimeZone
......@@ -385,11 +385,10 @@ def safegmtime(t):
'''gmtime with a safety zone.'''
try:
t_int = int(t)
except OverflowError:
return gmtime(t_int)
except (IOError, OverflowError):
raise 'TimeError', 'The time %f is beyond the range ' \
'of this Python implementation.' % float(t)
rval = gmtime(t_int)
return rval
def safelocaltime(t):
'''localtime with a safety zone.'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment