Tzinfo object for the local timezone

Edit Package python-tzlocal
https://pypi.python.org/pypi/tzlocal/

This Python module returns a tzinfo object with the local timezone information under Unix and Win-32. It requires pytz, and returns pytz tzinfo objects.

This module attempts to fix a glaring hole in pytz, that there is no way to get the local timezone information, unless you know the zoneinfo name, and under several Linux distros that's hard or impossible to figure out.

With tzlocal you only need to call get_localzone() and you will get a tzinfo object with the local time zone info. On some Unices you will still not get to know what the timezone name is, but you don't need that when you have the tzinfo file. However, if the timezone name is readily available it will be used.

Refresh
Refresh
Source Files
Filename Size Changed
2.1.tar.gz 0000018463 18 KB
python-tzlocal.changes 0000005061 4.94 KB
python-tzlocal.spec 0000002548 2.49 KB
Revision 11 (latest revision is 16)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 810919 from Dirk Mueller's avatar Dirk Mueller (dirkmueller) (revision 11)
- update to 2.1:
  - The is_dst flag is wrong for Europe/Dublin on some Unix releases.
  I changed to another way of determining if DST is in effect or not.
  - Added support for Python 3.7 and 3.8. Dropped 3.5 although it still works.
Comments 0
openSUSE Build Service is sponsored by