Socket
Book a DemoInstallSign in
Socket

timezones-lib

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezones-lib

Get current time in different timezones (PST, BST, WAT, CET, EST)

Source
pipPyPI
Version
1.0.0
Maintainers
1

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

Keywords

timezone

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts