[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.
--- 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)