diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2021-08-11 21:03:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 21:03:29 +0000 |
commit | 63269b60fe7f928c29439357177ab56242723258 (patch) | |
tree | d54633e92f854dfe9f5e0e0361e46e35c2dcfe7d /pkg/util/utils.go | |
parent | 922699f0a1983f3f77946cef2fba934d80afdb6f (diff) | |
parent | 7442f0b858e5fe2d7922b3b5714030fda5b2646e (diff) | |
download | podman-63269b60fe7f928c29439357177ab56242723258.tar.gz podman-63269b60fe7f928c29439357177ab56242723258.tar.bz2 podman-63269b60fe7f928c29439357177ab56242723258.zip |
Merge pull request #11193 from mheon/release_notes_33
Release notes for Podman v3.3.0-RC2
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r-- | pkg/util/utils.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 60aa64ac1..774590f44 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -3,6 +3,7 @@ package util import ( "encoding/json" "fmt" + "math" "os" "os/user" "path/filepath" @@ -530,9 +531,10 @@ func ParseInputTime(inputTime string) (time.Time, error) { } } - unixTimestamp, err := strconv.ParseInt(inputTime, 10, 64) + unixTimestamp, err := strconv.ParseFloat(inputTime, 64) if err == nil { - return time.Unix(unixTimestamp, 0), nil + iPart, fPart := math.Modf(unixTimestamp) + return time.Unix(int64(iPart), int64(fPart*1_000_000_000)).UTC(), nil } // input might be a duration |