kubernetes / kubectl

Issue tracker and mirror of kubectl code
Apache License 2.0
2.88k stars 922 forks source link

Support human readable timestamps in `custom-columns` printer #1514

Open ahmetb opened 1 year ago

ahmetb commented 1 year ago

What would you like to be added:

Currently, --output=custom-columns=AGE:.metadata.creationTimestamp prints metav1.Time fields in ISO 8601 format (seen below), instead of the default "human readable" date strings like 3m or 16h that the default table printer uses.

kubectl get pods --output=custom-columns=NAME:.metadata.name,AGE:.metadata.creationTimestamp
NAME      AGE
foo-bar   2023-11-03T22:23:49Z

Why is this needed:

I'm not entirely sure if this is a valid ask, so please evaluate.

/sig cli

k8s-ci-robot commented 1 year ago

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 9 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 8 months ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

kdeyko commented 5 days ago

/remove-lifecycle rotten