A command-line tool to display current time for different timezones
Project description
worldtimebuddy
Get current time for all possible timezone using CLI (exclusively for developers)
Version - 0.1.3
Usage: worldtimebuddy [OPTIONS]
Display current time for all timezones, major timezones, or a specific
timezone.
Options:
--format TEXT DateTime format string
--major Show only major timezones
-tz, --timezone TEXT Show time for a specific timezone
--list List all available timezones
--delta TEXT Add or subtract time from a particular timezone
--help Show this message and exit.
Installation (PyPI):
pip3 install worldtimebuddy
Installation (Development):
- Clone the repository locally
git clone https://github.com/dubesar/worldtimebuddy.git
cd worldtimebuddy
- Run the following code to install dependencies and worldtimebuddy
pip install -r requirements.txt
python3 setup.py build
python3 setup.py install
Usage:
- Get all the timezones
> worldtimebuddy
Africa/Abidjan 2024-10-06 13:49:11
Africa/Accra 2024-10-06 13:49:11
....
- Get all timezone in particular format
> worldtimebuddy --format '%A, %B %d, %Y %I:%M %p %Z'
Africa/Abidjan Sunday, October 06, 2024 01:49 PM GMT
Africa/Accra Sunday, October 06, 2024 01:49 PM GMT
Africa/Addis_Ababa Sunday, October 06, 2024 04:49 PM EAT
...
- Get major timezones
Currenlty only IST/PST/PDT/UTC by default. But user can set major timezones in their environment with name MAJOR_TIMEZONES
, this tool will pick up those as the major
versions.
eg.
> export MAJOR_TIMEZONES=["UTC","Asia/Kolkata"]
> worldtimebuddy --major
UTC 2024-10-06 13:50:26
PDT 2024-10-06 06:50:26
Asia/Kolkata 2024-10-06 19:20:26
- Listing all timezones
> worldtimebuddy --list
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
...
- Getting a particular timezone
> worldtimebuddy --timezone UTC
UTC 2024-10-06 19:33:35
> worldtimebuddy --timezone JST
Asia/Tokyo 2024-10-07 04:33:35
...
- Getting a difference of time from a particular timezone
(supported time formats: +/- min, hr, day)
> worldtimebuddy --timezone UTC --delta +2hr
UTC 2024-10-06 20:43:35
...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
worldtimebuddy-0.1.3.tar.gz
(7.6 kB
view details)
Built Distribution
File details
Details for the file worldtimebuddy-0.1.3.tar.gz
.
File metadata
- Download URL: worldtimebuddy-0.1.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e08bf44e41619286f578187dd18c4bba45e86e0077a24825b2c2ab3d30363f |
|
MD5 | 981adc39ceee2692ae1c8a9fa934b8ec |
|
BLAKE2b-256 | 328cf6510fbfdce30499e604f16bf6a10213314307e12e85aa072f8bba773559 |
File details
Details for the file worldtimebuddy-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: worldtimebuddy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b89ae5cda9c4478a3cb47d7d1b67dd6aa6b254afac07282693f13efda7126f8 |
|
MD5 | a7ba32cb7d0b285ec46aa2d58910fa8b |
|
BLAKE2b-256 | 8aae0f487e6d65ececf52ff232581378c8cb7a76e535644b9c35dd7df83c616c |