Skip to content

V0.0.3 Time subcommand

Choose a tag to compare

@digizeph digizeph released this 15 Jul 02:15
· 395 commits to main since this release
5ba1567

New subcommand monocle time

monocle time prints out the UNIX timestamp and the corresponding RFC3339 time string. You can provide it a timestamp, a time string, or nothing.

➜  monocle time
+------------+---------------------------+
|    unix    |          rfc3339          |
+------------+---------------------------+
| 1657850362 | 2022-07-15T01:59:22+00:00 |
+------------+---------------------------+

➜  monocle time 0                               
+------+---------------------------+
| unix |          rfc3339          |
+------+---------------------------+
|  0   | 1970-01-01T00:00:00+00:00 |
+------+---------------------------+

➜  monocle time 2022-01-01T00:00:00Z
+------------+---------------------------+
|    unix    |          rfc3339          |
+------------+---------------------------+
| 1640995200 | 2022-01-01T00:00:00+00:00 |
+------------+---------------------------+

➜  monocle time 2022-01-01T00:00:00 
Input time must be either Unix timestamp or time string compliant with RFC3339

Enhanced RFC3339 support

It now validates and enforces RFC3339 everywhere when time string is used.

Issues closed

Pull requests and full changelog

Full Changelog: v0.0.2...v0.0.3