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
python-tzlocal.changes 0000001841 1.8 KB
python-tzlocal.spec 0000002668 2.61 KB
tzlocal-1.4.tar.gz 0000015279 14.9 KB
Revision 9 (latest revision is 36)
Thomas Bechtold's avatar Thomas Bechtold (tbechtold) accepted request 519195 from James Mason's avatar James Mason (bear454) (revision 9)
- Update to version 1.4
  - Relicensed upstream as MIT
  - Dropping support for Python versions 2.5, 3.1, 3.2
  - adding support for Python 3.6 
  - Closes stdout and stderr to get rid of ResourceWarnings
  - Added support for /var/db/zoneinfo
  - Tests failed if TZ was set in the environment.
  - Replaces os.popen() with subprocess.Popen()
  - Systemd stores no time zone name, forcing us to look at the 
    name of the file that localtime symlinks to.
Comments 0
openSUSE Build Service is sponsored by