Commit b39e614b authored by Kiran Jonnalagadda's avatar Kiran Jonnalagadda

Fixed bug with fractional timezones being rounded off due to an integer divide.

parent 5fe5340a
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
############################################################################## ##############################################################################
"""Encapsulation of date/time values""" """Encapsulation of date/time values"""
__version__='$Revision: 1.95 $'[11:-2] __version__='$Revision: 1.96 $'[11:-2]
import os, re, math, DateTimeZone import os, re, math, DateTimeZone
...@@ -279,7 +279,7 @@ def _findLocalTimeZoneName(isDST): ...@@ -279,7 +279,7 @@ def _findLocalTimeZoneName(isDST):
localzone = altzone localzone = altzone
else: else:
localzone = timezone localzone = timezone
offset=(-localzone/(60*60)) offset=(-localzone/(60*60.0))
majorOffset=int(offset) majorOffset=int(offset)
if majorOffset != 0 : if majorOffset != 0 :
minorOffset=abs(int((offset % majorOffset) * 60.0)) minorOffset=abs(int((offset % majorOffset) * 60.0))
......
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