mirror of
https://github.com/psviderski/uncloud.git
synced 2026-11-10 20:54:17 +00:00
feat(logs): add support for days unit (d) in --since/until filters for logs
This commit is contained in:
@@ -28,7 +28,7 @@ func timestamp(value string, now time.Time) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
// A bare zero is the Unix epoch, matching Docker's log filters.
|
||||
if duration, err := time.ParseDuration(value); value != "0" && err == nil {
|
||||
if duration, err := ParseDuration(value); value != "0" && err == nil {
|
||||
return now.Add(-duration).UTC().Format(time.RFC3339Nano), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user