BSD Ports

time/py-tzlocal 5.4.4 NetBSD

Python tzinfo object for the local timezone

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
mit
Categories
time, python
Package size
32.9 KiB, 163.9 KiB installed

Description

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.

In the other systems

SystemPortVersion
NetBSDtime/py-tzlocal5.4.4
DragonFlydevel/py-tzlocal5.2

Install

Binary package:

pkgin install py311-tzlocal

From pkgsrc:

cd /usr/pkgsrc/time/py-tzlocal && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_645.4.4
NetBSD 10.1 aarch645.3.1nb1
SmartOS / illumos x86_645.4.4
macOS 15 arm645.4.4

Dependencies

Run dependencies 1

Configuration

No options to configure.

Service scripts
none
Flavors
py312-tzlocal-5.4.4, py313-tzlocal-5.4.4, py314-tzlocal-5.4.4