#kubectl #time #string #seconds #command #parse #time-parser

app parse_kubectl_time

Parse time strings from kubectl commands in seconds, e.g., 2m10s -> 130

4 releases

0.2.2 Jun 11, 2022
0.2.1 Jun 11, 2022
0.2.0 Jun 11, 2022
0.1.0 Jun 10, 2022

#506 in Date and time

MIT license

3KB

Parse Kubectl Time

This is a simple rust program that takes relative time strings in the format output by kubectl and parses them into seconds

For example:

2m10s -> 130 1d2h -> 93600

I wrote this to use as part of a shell function that sorts my kubectl events by when they last occurred

No runtime deps