Initial commit
This commit is contained in:
16
vendor/github.com/hyperhq/hypercli/pkg/archive/time_linux.go
generated
vendored
Normal file
16
vendor/github.com/hyperhq/hypercli/pkg/archive/time_linux.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package archive
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
func timeToTimespec(time time.Time) (ts syscall.Timespec) {
|
||||
if time.IsZero() {
|
||||
// Return UTIME_OMIT special value
|
||||
ts.Sec = 0
|
||||
ts.Nsec = ((1 << 30) - 2)
|
||||
return
|
||||
}
|
||||
return syscall.NsecToTimespec(time.UnixNano())
|
||||
}
|
||||
Reference in New Issue
Block a user