Crates.io | ontime-cli |
lib.rs | ontime-cli |
version | 0.1.1 |
source | src |
created_at | 2024-11-06 18:13:32.114488 |
updated_at | 2024-11-06 18:17:15.315917 |
description | Compare given timezones |
homepage | https://github.com/jcomello/ontime-cli |
repository | https://github.com/jcomello/ontime-cli |
max_upload_size | |
id | 1438657 |
size | 69,115 |
This is a CLI to show the time of given Timezones. Compare different places timezones.
First install rustup
using your system package manager, and then run:
rustup toolchain install nightly-2024-09-01
cargo install ontime-cli
Note that, in order to use cargo
and ontime
on Posix systems, you need
to put $CARGO_HOME/bin
(usually $HOME/.cargo/bin
) into PATH
.
Just say the timezones you want to compare and you're ready to go.
$ ontime-cli compare --timezone America/New_York --timezone Europe/London --timezone Europe/Berlin
And it'll bring:
Timezone | Time
_________________________ | ___________________________
America/New_York | 2024-10-27 21:10 EDT -04:00
Europe/London | 2024-10-28 01:10 GMT +00:00
Europe/Berlin | 2024-10-28 02:10 CET +01:00
You can set the local
flag to show your local timezone.
$ ontime-cli compare --timezone America/New_York --timezone Europe/London --timezone Europe/Berlin --local
And it'll bring:
Timezone | Time
_________________________ | ___________________________
America/Sao_Paulo (Local) | 2024-10-27 22:10 -03 -03:00
America/New_York | 2024-10-27 21:10 EDT -04:00
Europe/London | 2024-10-28 01:10 GMT +00:00
Europe/Berlin | 2024-10-28 02:10 CET +01:00
Also, it is possible add and subtract hours for your local time. The follow example, we're comparing Date Time 3 hours from current time.
$ ontime-cli compare --timezone america/new_york --timezone europe/london --timezone europe/berlin --from-now 3
The next example, 3 hours ago.
$ ontime-cli compare --timezone america/new_york --timezone europe/london --timezone europe/berlin --ago 3
If you want to know all available timezones, you can use the list command.
$ ontime-cli list
You can filter the available timezones if your need:
$ ontime-cli list --filter Brazil
AVAILABLE TIMEZONES
-------------------
Brazil/Acre
Brazil/DeNoronha
Brazil/East
Brazil/West
Check open issues for known bugs and feature requests.
This software is licensed under the GPL-3.0 License.