Support Unix timestamps for podman logs --since
#8589
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To match what
podman-logs(1)
describes--since
: https://github.com/containers/podman/blob/master/docs/source/markdown/podman-logs.1.md#--sincetimestamp.I discovered this when testing a Python library that uses docker-py to retrieve container logs [1][2]. Under the hood the
/containers/{id}/logs
API is called with since as a UNIX timestamp [3]. Hopefully this fix can help with compatibility between Podman and docker-py [4].[1] getmoto/moto#3276
[2] https://github.com/spulec/moto/blob/b6369d62503651a3c614fb2b3ee08c8013b732fc/moto/batch/models.py#L454-L473
[3] https://docs.docker.com/engine/api/v1.40/#operation/ContainerLogs
[4] #5386