Python Package to get all the information about a Time Zone
Project description
py-tzone
py-tzone is a package to find the details for a timezone Like abbreviation or offset of any timezone from pytz import all_timezones
.
Installation
This package can either be installed using pip or from a tarball using the standard Python distutils.
If you are installing using pip
, you don’t need to download anything as the latest version will be downloaded for you from PyPI:
pip install py-tzone
Example & Usage
Import the method get_tz_details
from py_tzone
from py_tzone import get_tz_details
tz_details = get_tz_details('Europe/Amsterdam')
print(tz_details)
{
'value': 'W. Europe Standard Time',
'abbr': 'WEDT',
'offset': 2,
'isdst': True,
'text': '(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',
'utc':['Arctic/Longyearbyen', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Berlin',
'Europe/Busingen', 'Europe/Gibraltar', 'Europe/Luxembourg','Europe/Malta','Europe/Monaco',
'Europe/Oslo', 'Europe/Rome', 'Europe/San_Marino',
'Europe/Stockholm', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna','Europ/Zurich']
}
What is UTC
UTC
is Coordinated Universal Time. It is a successor to, but distinct from, Greenwich Mean Time (GMT) and the various definitions of Universal Time. UTC is now the worldwide standard for regulating clocks and time measurement.
All other timezones are defined relative to UTC, and include offsets like UTC+0800 - hours to add or subtract from UTC to derive the local time. No daylight saving time occurs in UTC, making it a useful timezone to perform date arithmetic without worrying about the confusion and ambiguities caused by daylight saving time transitions, your country changing its timezone, or mobile computers that roam through multiple timezones.
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
Built Distribution
File details
Details for the file py_tzone-1.6.1.tar.gz
.
File metadata
- Download URL: py_tzone-1.6.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbee0dd3215e297e9eb90a1a2d954e9476decd8eab5629ca798050a6b64b5a2d |
|
MD5 | 9feb5efc745b5b55c629290034b993da |
|
BLAKE2b-256 | da0481510c4e3e8d0ba26f2c2eb785f4e3ed1e22cb4ddbfcb6a6d4d971c7926a |
File details
Details for the file py_tzone-1.6.1-py3-none-any.whl
.
File metadata
- Download URL: py_tzone-1.6.1-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd545ff757d22e2114d25e056e296f0c847db35ca9a600cf7df60716401e27ad |
|
MD5 | b9e1762ec53823175a7207eb371b09dc |
|
BLAKE2b-256 | 611d66c081dd7de0e7cdfd1b78740af47972439b373ee138d88d2a1ff32b600a |