diff options
author | Simon Hausmann <hausmann@kde.org> | 2007-01-31 19:43:16 +0100 |
---|---|---|
committer | Simon Hausmann <hausmann@kde.org> | 2007-01-31 19:43:16 +0100 |
commit | d93ed31ac4b1f8963fa83d02aa6bf6148f86e50d (patch) | |
tree | d708a9c0caf958bf7e2fc4c3b9fc06edce5179f1 | |
parent | Implemented basic support for converting the date of the perforce change to t... (diff) | |
download | tgif-d93ed31ac4b1f8963fa83d02aa6bf6148f86e50d.tar.xz |
Some fixes to the timezone conversion between the date of a perforce change and the git commit.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
-rw-r--r-- | contrib/fast-import/p4-fast-export.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/fast-import/p4-fast-export.py b/contrib/fast-import/p4-fast-export.py index 689349d551..f3b5f35cb3 100644 --- a/contrib/fast-import/p4-fast-export.py +++ b/contrib/fast-import/p4-fast-export.py @@ -46,7 +46,7 @@ def describe(change): splitted = firstLine.split(" ") author = splitted[3] author = author[:author.find("@")] - tm = time.strptime(splitted[5] + " " + splitted[6] + time.tzname[0], "%Y/%m/%d %H:%M:%S %Z") + tm = time.strptime(splitted[5] + " " + splitted[6], "%Y/%m/%d %H:%M:%S ") epoch = int(time.mktime(tm)) filesSection = 0 @@ -126,6 +126,8 @@ changes.reverse() sys.stderr.write("\n") +tz = - time.timezone / 36 + cnt = 1 for change in changes: [ author, log, epoch, changedFiles, removedFiles ] = describe(change) @@ -137,9 +139,9 @@ for change in changes: print "commit refs/heads/master" if author in users: - print "committer %s %s +0000" % (users[author], epoch) + print "committer %s %s %s" % (users[author], epoch, tz) else: - print "committer %s <a@b> %s +0000" % (author, epoch) + print "committer %s <a@b> %s %s" % (author, epoch, tz) print "data <<EOT" for l in log: print l[:len(l) - 1] |