From 8715bfbf70c1ad8a4ca21360e9bfef35dc9a363f Mon Sep 17 00:00:00 2001 From: Adam Robinson Date: Tue, 26 Jun 2018 14:06:37 -0400 Subject: [PATCH] set all tar timestamp fields to the zero date --- post-processor/compress/tar_fix_go110.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/post-processor/compress/tar_fix_go110.go b/post-processor/compress/tar_fix_go110.go index 016b6b656..be8456321 100644 --- a/post-processor/compress/tar_fix_go110.go +++ b/post-processor/compress/tar_fix_go110.go @@ -2,10 +2,16 @@ package compress -import "archive/tar" +import ( + "archive/tar" + "time" +) func setHeaderFormat(header *tar.Header) { // We have to set the Format explicitly for the googlecompute-import // post-processor. Google Cloud only allows importing GNU tar format. header.Format = tar.FormatGNU + header.AccessTime = time.Time{} + header.ModTime = time.Time{} + header.ChangeTime = time.Time{} }