mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
set all tar timestamp fields to the zero date
This commit is contained in:
parent
3622a669dc
commit
8715bfbf70
1 changed files with 7 additions and 1 deletions
|
|
@ -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{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue