Mercurial > hg
changeset 1482:4d38b85e60aa
fix handling of daylight saving time
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 31 Oct 2005 10:56:42 -0700 |
parents | acd1832ebf31 |
children | a4ba63e04134 |
files | mercurial/util.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sat Oct 29 13:45:01 2005 -0700 +++ b/mercurial/util.py Mon Oct 31 10:56:42 2005 -0700 @@ -610,10 +610,12 @@ 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.