feat(logs): add support for days unit (d) in --since/until filters for logs

This commit is contained in:
Pasha Sviderski committed 2026-10-07 13:30:25 +10:00
1 parent 409dc3bfe3
commit 5e26cfbead
5 files changed
+145 -9

No files matched your search

+1 -1
View File
@@ -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
}