mirror of
https://github.com/frej/fast-export.git
synced 2025-11-07 11:45:40 +01:00
this way the time zone seems to work
This commit is contained in:
@@ -46,7 +46,7 @@ def describe(change):
|
|||||||
splitted = firstLine.split(" ")
|
splitted = firstLine.split(" ")
|
||||||
author = splitted[3]
|
author = splitted[3]
|
||||||
author = author[:author.find("@")]
|
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))
|
epoch = int(time.mktime(tm))
|
||||||
|
|
||||||
filesSection = 0
|
filesSection = 0
|
||||||
@@ -126,6 +126,8 @@ changes.reverse()
|
|||||||
|
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
|
|
||||||
|
tz = - time.timezone / 36
|
||||||
|
|
||||||
cnt = 1
|
cnt = 1
|
||||||
for change in changes:
|
for change in changes:
|
||||||
[ author, log, epoch, changedFiles, removedFiles ] = describe(change)
|
[ author, log, epoch, changedFiles, removedFiles ] = describe(change)
|
||||||
@@ -137,9 +139,9 @@ for change in changes:
|
|||||||
|
|
||||||
print "commit refs/heads/master"
|
print "commit refs/heads/master"
|
||||||
if author in users:
|
if author in users:
|
||||||
print "committer %s %s +0000" % (users[author], epoch)
|
print "committer %s %s %s" % (users[author], epoch, tz)
|
||||||
else:
|
else:
|
||||||
print "committer %s <a@b> %s +0000" % (author, epoch)
|
print "committer %s <a@b> %s %s" % (author, epoch, tz)
|
||||||
print "data <<EOT"
|
print "data <<EOT"
|
||||||
for l in log:
|
for l in log:
|
||||||
print l[:len(l) - 1]
|
print l[:len(l) - 1]
|
||||||
|
|||||||
Reference in New Issue
Block a user