[Pkg-bazaar-commits] ./bzr/unstable r73: fix time.localtime call for python 2.3
mbp at sourcefrog.net
mbp at sourcefrog.net
Fri Apr 10 07:49:08 UTC 2009
------------------------------------------------------------
revno: 73
committer: mbp at sourcefrog.net
timestamp: Wed 2005-03-23 17:37:30 +1100
message:
fix time.localtime call for python 2.3
modified:
NEWS
bzrlib/osutils.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2005-03-23 06:25:55 +0000
+++ b/NEWS 2005-03-23 06:37:30 +0000
@@ -5,6 +5,10 @@
* Include a subset of ElementTree-1.2.20040618 to make
installation easier.
+ * Fix time.localtime call to work with Python 2.3 (the minimum
+ supported).
+
+
bzr-0.0.0.69 2005-03-22
=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py 2005-03-22 07:02:07 +0000
+++ b/bzrlib/osutils.py 2005-03-23 06:37:30 +0000
@@ -179,6 +179,10 @@
def local_time_offset(t=None):
"""Return offset of local zone from GMT, either at present or at time t."""
+ # python2.3 localtime() can't take None
+ if t is None:
+ t = time.time()
+
if time.localtime(t).tm_isdst and time.daylight:
return -time.altzone
else:
More information about the Pkg-bazaar-commits
mailing list