./time/py-tzlocal, Python tzinfo object for the local timezone

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.1, Package name: py37-tzlocal-2.1, Maintainer: pkgsrc-users

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.

Also, with Windows different timezone system using pytz isn't of
much use unless you separately configure the zoneinfo timezone
name.

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.


Required to run:
[devel/py-setuptools] [time/py-pytz] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 7d2d590f68849e6b6371210bd808b40ec5619faf
RMD160: 19f7979e221659e3f90300656e01f483733433c1
Filesize: 21.936 KB

Version history: (Expand)


CVS history: (Expand)


   2020-05-12 20:20:07 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-tzlocal: updated to 2.1

2.1:
- No changes.

2.1b1:
- 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.
   2019-08-12 21:58:13 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-tzlocal: updated to 2.0.0

2.0.0:

Major differences since 1.5.1
- When no time zone configuration can be find, tzlocal now return UTC.
  This is a major difference from 1.x, where an exception would be raised.
  This change is because Docker images often have no configuration at all,
  and the unix utilities will then default to UTC, so we follow that.
- If tzlocal on Unix finds a timezone name in a /etc config file, then
  tzlocal now verifies that the timezone it fouds has the same offset as
  the local computer is configured with. If it doesn't, something is
  configured incorrectly.
- Get timezone via Termux `getprop` wrapper on Android. It's not officially
  supported because we can't test it, but at least we make an effort.

Minor differences and bug fixes
- Skip comment lines when parsing /etc/timezone.
- Don't load timezone from current directory.
- Now verifies that the config files actually contain something before
  reading them.
- Got rid of a BytesWarning
- Now handles if config file paths exists, but are directories.
- Moved tests out from distributions
- Support wheels
   2017-12-06 13:21:03 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-tzlocal: updated to 1.5.1

1.5.1:
- 1.5 had a bug that slipped through testing, fixed that,
increased test coverage.

1.5:
- No longer treats macOS as special, but as a unix.
- get_windows_info.py is renamed to update_windows_mappings.py
- Windows mappings now also contain mappings from deprecated zoneinfo names.
(Preston-Landers, regebro)
   2017-05-09 22:10:27 by Adam Ciarcinski | Files touched by this commit (3)
Log message:
Changes 1.4:
I use MIT on my other projects, so relicensing.
Dropping support for Python versions nobody uses (2.5, 3.1, 3.2), adding 3.6 \ 
Python 3.1 and 3.2 still works, 2.5 has been broken for some time.
Ayalash’s OS X fix didn’t work on Python 2.7, fixed that.
   2016-06-08 19:43:49 by Thomas Klausner | Files touched by this commit (356)
Log message:
Switch to MASTER_SITES_PYPI.
   2015-11-03 00:31:47 by Alistair G. Crooks | Files touched by this commit (161)
Log message:
Add SHA512 digests for distfiles for time category

Problems found with mismatching existing digests for:
	distfiles/asclock-classic-1.0.tar.gz
	distfiles/asclock-gtk-2.1.10beta.tar.gz
	distfiles/asclock-xlib-2.0.11.tar.gz
	distfiles/emiclock-2.0.2.tar.gz

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.
   2015-02-04 12:41:10 by Thomas Klausner | Files touched by this commit (4)
Log message:
Import py34-tzlocal-1.1.2 as time/py-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.

Also, with Windows different timezone system using pytz isn't of
much use unless you separately configure the zoneinfo timezone
name.

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.