Crates.io | timeseries-cli |
lib.rs | timeseries-cli |
version | 0.6.0 |
source | src |
created_at | 2022-03-14 00:24:10.152122 |
updated_at | 2022-06-21 23:21:33.209017 |
description | Generate a series of timestamps between two bounds. |
homepage | |
repository | https://github.com/bww/timeseries |
max_upload_size | |
id | 549506 |
size | 17,828 |
A simple command line tool that generates a series of timestamps given start and end dates. If an end date is omitted, the current time is used.
$ timeseries series --since=2022-03-05T00:00:00Z --until=2022-03-10T00:00:00Z --stride=1d
2022-03-05T00:00:00Z
2022-03-06T00:00:00Z
2022-03-07T00:00:00Z
2022-03-08T00:00:00Z
2022-03-09T00:00:00Z
2022-03-10T00:00:00Z
You can express the start and end dates as:
+12h30m
or -90d
,yesterday
, today
, now
, tomorrow
.$ timeseries series --since=-5d --until=now --stride=1d
2022-03-10T03:35:09Z
2022-03-11T03:35:09Z
2022-03-12T03:35:09Z
2022-03-13T03:35:09Z
2022-03-14T03:35:09Z
2022-03-15T03:35:09Z
The --stride
flag can be used to adjust the duration between each timestamp that is output.
$ timeseries series --since=-5h --stride=30m
2022-03-14T22:35:31Z
2022-03-14T23:05:31Z
2022-03-14T23:35:31Z
2022-03-15T00:05:31Z
2022-03-15T00:35:31Z
2022-03-15T01:05:31Z
...