{"id":28392,"library":"timezone-tools","title":"Timezone Tools","description":"A Python library providing utilities for working with timezone-aware datetimes, including conversion, formatting, and common timezone operations. Current version 0.1.0.post1, requires Python >=3.10. Active development.","status":"active","version":"0.1.0.post1","language":"python","source_language":"en","source_url":"https://github.com/kraken-tech/timezone-tools","tags":["timezone","datetime","utilities","pytz"],"install":[{"cmd":"pip install timezone-tools","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used for timezone database and timezone objects","package":"pytz","optional":false},{"reason":"Used for parsing and handling dates","package":"python-dateutil","optional":false}],"imports":[{"note":"Importing from submodule may not be exposed.","wrong":"from timezone_tools.converter import TimezoneConverter","symbol":"TimezoneConverter","correct":"from timezone_tools import TimezoneConverter"},{"note":"Utilities are not a public submodule.","wrong":"from timezone_tools.utils import format_aware_datetime","symbol":"format_aware_datetime","correct":"from timezone_tools import format_aware_datetime"},{"note":"Helper functions are accessible directly from package.","wrong":"from timezone_tools.helpers import utcnow","symbol":"utcnow","correct":"from timezone_tools import utcnow"}],"quickstart":{"code":"from timezone_tools import TimezoneConverter, format_aware_datetime\nfrom datetime import datetime\nimport os\n\ntz = 'America/New_York'\nconverter = TimezoneConverter()\ndt = datetime.now(tz=tz)\nformatted = format_aware_datetime(dt, 'YYYY-MM-DD HH:mm:ss')\nprint(formatted)","lang":"python","description":"Initialize a TimezoneConverter, create an aware datetime in a specific timezone, and format it using a custom pattern."},"warnings":[{"fix":"Use only valid IANA timezone identifiers. Check with pytz.all_timezones if unsure.","message":"TimezoneConverter may use pytz timezone objects; ensure you pass a valid IANA timezone string (e.g., 'America/New_York'). Invalid strings may raise a pytz.exceptions.UnknownTimeZoneError.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin to timezone-tools==0.1.0.post1 in requirements.txt or setup.py.","message":"The library is in an early release (0.1.0.post1). APIs may change without notice. Pin your dependency to a specific version in production.","severity":"gotcha","affected_versions":"<=0.1.0.post1"},{"fix":"Prepare to migrate code that relies on pytz behavior; monitor the library's future releases.","message":"The use of 'pytz' is deprecated in favor of 'zoneinfo' (available in Python 3.9+). This library currently uses pytz, but future versions may migrate to zoneinfo.","severity":"deprecated","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Replace 'US/Eastern' with 'America/New_York' or another valid IANA timezone.","cause":"Using an outdated or incorrect timezone string. 'US/Eastern' is deprecated; use 'America/New_York'.","error":"pytz.exceptions.UnknownTimeZoneError: 'US/Eastern'"},{"fix":"Check the API documentation. Likely use `converter.to_timezone(dt, target_tz)` instead of `convert`.","cause":"The method may be named differently or not exist in the current version.","error":"AttributeError: 'TimezoneConverter' object has no attribute 'convert'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}