Skip to content

ibLeDy/timezone-converter

Repository files navigation

Timezone Converter

Compare a full day of your local timezone with foreign ones


integration status deployment status pre-commit.ci status python version latest release code style

$ timezone-converter tijuana --zone $ timezone-converter tijuana new_york
comparison between two timezones with zone info comparison between three timezones

Motivation

When working with people that are not in your local timezone, the available resources are the usual webpages that only show one hour at a time, which is pretty inconvenient.

With this package you can quickly compare a full day of your timezone against foreign ones.

Installation

pip install -U timezone-converter

Usage

timezone-converter <timezone> [<timezone> ...]

The short alias tzconv also works, if you prefer less typing.

Useful flags:

timezone-converter tijuana new_york --zone
timezone-converter tijuana new_york --order
timezone-converter tijuana --hour 14
timezone-converter tijuana --difference
timezone-converter --search york
timezone-converter --list tbd

Docker

docker run --rm -t bledy/timezone-converter <timezone> [<timezone> ...]

Features

Comparison between multiple timezones

Multiple timezones can be provided to get a side-by-side comparison. Short timezone names such as new_york are supported, as are canonical timezone paths such as America/New_York.

Current hour highlighting

The row containing the current hour will be highlighted.

Zone abbreviations

Using the --zone argument, each column header will include the timezone abbreviation for that day, such as PST or CEST.

Ordered columns

Using the --order argument, timezone columns will be sorted by their offset difference from your local timezone.

Difference in hours

Using the --difference argument, each column header will include the signed difference in hours from your local timezone, such as +9.5h or -5h. When combined with --zone, the difference is appended after the zone abbreviation, e.g. AMERICA/TIJUANA (PST) -8h.

Output a single hour

Using the --hour argument, you can output a single hour. If you don't provide a value, the current hour will be displayed.

Search for a timezone

Using the --search argument, you can fuzzy-search for available timezone names.

List of available timezones

Using the --list argument, you can see a pretty list of available timezones, by groups, and sorted alphabetically. You can optionally provide letters to filter the groups that are shown.

$ timezone-converter --list

list of available timezones

License

This project is licensed under the terms of the MIT license.

Sponsor this project

  •  

Packages

 
 
 

Contributors