Mercurial > hg
changeset 968:4a9a753e8232
[PATCH] Take DST into account
Right now, mercurial doesn't take daylight saving time into account
because it uses time.timezone inconditionally, instead of resorting to
time.altzone if daylight saving time is on.
author | Samuel Tardieu <sam@rfc1149.net> |
---|---|
date | Fri, 19 Aug 2005 23:26:32 -0800 |
parents | 1f3710636b45 |
children | 1d5b97537561 |
files | mercurial/hg.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Aug 19 23:23:42 2005 -0800 +++ b/mercurial/hg.py Fri Aug 19 23:26:32 2005 -0800 @@ -280,7 +280,12 @@ def add(self, manifest, list, desc, transaction, p1=None, p2=None, user=None, date=None): - date = date or "%d %d" % (time.time(), time.timezone) + if date: + date = util.date_parser(date) + else: + if time.daylight: offset = time.altzone + else: offset = time.timezone + date = "%d %d" % (time.time(), offset) list.sort() l = [hex(manifest), user, date] + list + ["", desc] text = "\n".join(l)