github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/pkg/archive/time_unsupported.go (about) 1 //go:build !linux 2 // +build !linux 3 4 package archive // import "github.com/docker/docker/pkg/archive" 5 6 import ( 7 "syscall" 8 "time" 9 ) 10 11 func timeToTimespec(time time.Time) (ts syscall.Timespec) { 12 nsec := int64(0) 13 if !time.IsZero() { 14 nsec = time.UnixNano() 15 } 16 return syscall.NsecToTimespec(nsec) 17 }