retz

Crates.ioretz
lib.rsretz
version0.1.2
sourcesrc
created_at2024-04-18 07:11:25.533189
updated_at2024-04-22 06:09:48.534613
descriptionCommand-line tool to convert timestamps to other timezones
homepage
repositoryhttps://github.com/tanelikaivola/retz
max_upload_size
id1212204
size31,824
Taneli Kaivola (tanelikaivola)

documentation

README

retz - retimezone

Convert timestamps to other timezones.

Installation

With Cargo

cargo install retz

Usage

Command-line tool to convert timestamps to other timezones

Usage: retz [OPTIONS] [DATE]

Arguments:
  [DATE]  Date time in only proper format (RFC3339)

Options:
  -t, --to <TZ>  Convert to timezone
  -q, --quiet    Quiet, return just either target (if defined) or UTC
  -a, --all      List all timezones
  -o, --order    Order by offset instead of alphabetical
  -h, --help     Print help
  -V, --version  Print version

Current time to UTC and local

$ retz
   UTC: 2024-03-31T09:34:56Z
 Local: 2024-03-31T12:34:56+03:00

Current time to UTC (scriptable output)

$ retz -q
2024-03-31T12:00:00Z

Input time to convert to UTC and local timezones

$ retz "2024-03-31T12:00:00Z"   
 Input: 2024-03-31T12:00:00Z
   UTC: 2024-03-31T12:00:00Z
 Local: 2024-03-31T15:00:00+03:00

Convert to specific timezone

$ retz -t "Australia/Eucla" 
   UTC: 2024-03-31T12:00:00Z
 Local: 2024-03-31T15:00:00+03:00
Target: 2024-03-31T20:45:00+08:45

Convert to all known timezones

$ retz -a 
                             UTC: 2024-03-31T12:00:00Z
                           Local: 2024-03-31T15:00:00+03:00
                  Africa/Abidjan: 2024-03-31T12:00:00Z
                    Africa/Accra: 2024-03-31T12:00:00Z
              Africa/Addis_Ababa: 2024-03-31T15:00:00+03:00
                             ...
                             UTC: 2024-03-31T12:00:00Z
                       Universal: 2024-03-31T12:00:00Z
                            W-SU: 2024-03-31T15:00:00+03:00
                             WET: 2024-03-31T13:00:00+01:00
                            Zulu: 2024-03-31T12:00:00Z
Commit count: 8

cargo fmt