Patchwork [Bug,3966] New: convert uses wrong TZ when writing .hgtags

mail settings
Date June 18, 2013, 3:03 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/1732/
State Changes Requested
Headers show

Comments - June 18, 2013, 3:03 p.m.

          Priority: normal
            Bug ID: 3966
           Summary: convert uses wrong TZ when writing .hgtags
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.5.4
         Component: convert
           Product: Mercurial

Using convert to isolate a given directory tree (using filemap), I see that the
date is wrong in the automatic commit to fix up .hgtags:

changeset: [draft] 543:45ecef7efaf3
author:    convert-repo
date:      Tue, 18 Jun 2013 19:08:32 +0000 (4 hours from now)
summary:   update tags

A .hgtags

That should -0400 where I am located (all of the other timestamps are correct).

This seems like the appropriate fix:


diff --git a/hgext/convert/ b/hgext/convert/
--- a/hgext/convert/
+++ b/hgext/convert/
@@ -203,7 +203,7 @@ 
             return context.memfilectx(f, data, False, False, None)

         self.ui.status(_("updating tags\n"))
-        date = "%s 0" % int(time.mktime(time.gmtime()))
+        date = "%s 0" % int(time.mktime(time.localtime()))
         extra = {'branch': self.tagsbranch}
         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
                              [".hgtags"], getfilectx, "convert-repo", date,