From da11cb633b4cef97f0c5013b5cbacad907b0efed Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 31 Jan 2007 19:43:16 +0100 Subject: [PATCH] this way the time zone seems to work --- p4-fast-export.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/p4-fast-export.py b/p4-fast-export.py index 689349d..f3b5f35 100644 --- a/p4-fast-export.py +++ b/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 %s +0000" % (author, epoch) + print "committer %s %s %s" % (author, epoch, tz) print "data <