summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlorry.zip-importer5
1 files changed, 4 insertions, 1 deletions
diff --git a/lorry.zip-importer b/lorry.zip-importer
index cab5e26..3b1ddd6 100755
--- a/lorry.zip-importer
+++ b/lorry.zip-importer
@@ -10,6 +10,7 @@
## python import-zips.py *.zip
## git log --stat import-zips
+import calendar
import os.path
import subprocess
import sys
@@ -55,8 +56,10 @@ def export(zipfile, fast_import):
'data ' + str(info.file_size)))
fast_import.write(zip.read(name) + b"\n")
+ # Zip file timestamps are in local time, but the time zone offset
+ # is unspecified. We choose to interpret them as UTC.
committer = committer_name + ' <' + committer_email + '> %d +0000' % \
- time.mktime(commit_time + (0, 0, 0))
+ calendar.timegm(commit_time + (0, 0, 0))
zipfile_basename = os.path.basename(zipfile)
printlines(('commit ' + branch_ref, 'committer ' + committer, \