Skip to main content

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

Metadata

Release files for timezones-lib 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timezones-lib 1.0.0
File Size Uploaded
timezones_lib-1.0.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for timezones-lib 1.0.0
File Interpreter ABI Platform
timezones_lib-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / timezones_lib-1.0.0.tar.gz

Download URL timezones_lib-1.0.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2458cedee42f89bae03f6006ab2b6a2fb6f4de616d237b202bad928ee304ecd7
BLAKE2b-256 checksum
How to use checksums
b2c9c6b6ada17016676e28ae1ff4038033043865683c8a512629feb77d22c2af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / timezones_lib-1.0.0-py3-none-any.whl

Download URL timezones_lib-1.0.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c90b17e4e8ad91962e60eb1524c0fde2d85bb66008b29e852a99b94e96ca9a49
BLAKE2b-256 checksum
How to use checksums
69bdface1d11d8843c8584a4c921ff987bccf08302089e8264e02472537b16fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page