# HG changeset patch # User Paul Boddie # Date 1332703157 -7200 # Node ID fe647b8e49e4dabaa63aaafa104cb3ccc211e5e1 # Parent 34646cfc424eb29ac5b6042364e7b6e0559c76c6 Fixed the Olson time zone offset evaluation to consider day offsets as well as second offsets. Fixed the time string zone offset format. diff -r 34646cfc424e -r fe647b8e49e4 DateSupport.py --- a/DateSupport.py Sun Mar 25 20:44:24 2012 +0200 +++ b/DateSupport.py Sun Mar 25 21:19:17 2012 +0200 @@ -379,7 +379,7 @@ if zone_as_offset: utc_offset = self.utc_offset() if utc_offset: - time_str += "%02d:02d" % utc_offset + time_str += " %+03d:%02d" % utc_offset else: time_str += " %s" % data[6] return time_str @@ -558,7 +558,7 @@ dt = self.as_olson_datetime() if dt: - seconds = dt.utcoffset().seconds + seconds = dt.utcoffset().seconds + dt.utcoffset().days * 24 * 3600 hours = seconds / 3600 minutes = (seconds % 3600) / 60 return hours, minutes