# HG changeset patch # User Benoit Boissinot # Date 2005-10-31 17:56:42 # Node ID 4d38b85e60aa03be29c0e3ba30349fd405c80470 # Parent acd1832ebf319bffd79b65c1fdb88e72e396b069 fix handling of daylight saving time diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -610,10 +610,12 @@ def filechunkiter(f, size = 65536): s = f.read(size) def makedate(): - t = time.time() - if time.daylight: tz = time.altzone - else: tz = time.timezone - return t, tz + lt = time.localtime() + if lt[8] == 1 and time.daylight: + tz = time.altzone + else: + tz = time.timezone + return time.mktime(lt), tz def datestr(date=None, format='%c'): """represent a (unixtime, offset) tuple as a localized time.