github.com/rawahars/moby@v24.0.4+incompatible/pkg/archive/time_linux.go (about) 1 package archive // import "github.com/docker/docker/pkg/archive" 2 3 import ( 4 "syscall" 5 "time" 6 ) 7 8 func timeToTimespec(time time.Time) (ts syscall.Timespec) { 9 if time.IsZero() { 10 // Return UTIME_OMIT special value 11 ts.Sec = 0 12 ts.Nsec = (1 << 30) - 2 13 return 14 } 15 return syscall.NsecToTimespec(time.UnixNano()) 16 }