Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timezones_lib-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for timezones_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2458cedee42f89bae03f6006ab2b6a2fb6f4de616d237b202bad928ee304ecd7
MD5 34f6d2a7997d86650dc1b96f85ae7324
BLAKE2b-256 b2c9c6b6ada17016676e28ae1ff4038033043865683c8a512629feb77d22c2af

See more details on using hashes here.

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

Hashes for timezones_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c90b17e4e8ad91962e60eb1524c0fde2d85bb66008b29e852a99b94e96ca9a49
MD5 f897a7467ef8c68c9f3402847ee0ad08
BLAKE2b-256 69bdface1d11d8843c8584a4c921ff987bccf08302089e8264e02472537b16fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page