mirror of
https://github.com/containers/podman.git
synced 2025-06-03 12:17:13 +08:00
Support Unix timestamps for podman logs --since
To match what podman-logs(1) describes --since Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
This commit is contained in:
@ -530,6 +530,11 @@ func ParseInputTime(inputTime string) (time.Time, error) {
|
||||
}
|
||||
}
|
||||
|
||||
unix_timestamp, err := strconv.ParseInt(inputTime, 10, 64)
|
||||
if err == nil {
|
||||
return time.Unix(unix_timestamp, 0), nil
|
||||
}
|
||||
|
||||
// input might be a duration
|
||||
duration, err := time.ParseDuration(inputTime)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user