Get current time in different timezones (PST, BST, WAT, CET, EST)
Project description
Timezones Library
A Python library and CLI tool for getting current time in different timezones: PST, BST, WAT, CET, and EST.
Installation
pip install timezones-lib
Usage
Python Library
from timezones_lib import get_time_in_timezone, get_all_times
# Get time for specific timezone
pst_time = get_time_in_timezone('PST')
print(f"PST: {pst_time}")
# Get all supported timezones
all_times = get_all_times()
for tz, time in all_times.items():
print(f"{tz}: {time}")
CLI Tool
# Show all timezones
tzlib --all
# Get specific timezone
tzlib --timezone PST
# Show available options
tzlib
Supported Timezones
- PST: Pacific Standard Time (US/Pacific)
- BST: British Summer Time (Europe/London)
- WAT: West Africa Time (Africa/Lagos)
- CET: Central European Time (Europe/Berlin)
- EST: Eastern Standard Time (US/Eastern)
Development
Setup
git clone <repo-url>
cd timezones_lib
pip install -e .
Testing
python -m pytest tests/
Building
python -m build
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
timezones_lib-1.0.0.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timezones_lib-1.0.0.tar.gz.
File metadata
- Download URL: timezones_lib-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2458cedee42f89bae03f6006ab2b6a2fb6f4de616d237b202bad928ee304ecd7
|
|
| MD5 |
34f6d2a7997d86650dc1b96f85ae7324
|
|
| BLAKE2b-256 |
b2c9c6b6ada17016676e28ae1ff4038033043865683c8a512629feb77d22c2af
|
File details
Details for the file timezones_lib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: timezones_lib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c90b17e4e8ad91962e60eb1524c0fde2d85bb66008b29e852a99b94e96ca9a49
|
|
| MD5 |
f897a7467ef8c68c9f3402847ee0ad08
|
|
| BLAKE2b-256 |
69bdface1d11d8843c8584a4c921ff987bccf08302089e8264e02472537b16fa
|