Files
packages/lang/python/python-pytz/test.sh
Alexandru Ardelean 6e95bdf1b9 python-pytz: bump to 2026.1
Updated timezone data to 2026.1 release.

Full release notes:
https://github.com/stub42/pytz/blob/master/src/CHANGES.rst

pytz 2026.1 requires setuptools as build backend but it was not
declared as a build dependency, causing the build to fail with
'setuptools.build_meta:__legacy__ is not available'.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-03-13 21:30:10 +02:00

20 lines
385 B
Bash

#!/bin/sh
[ "$1" = python3-pytz ] || exit 0
python3 - << 'EOF'
import pytz
import datetime
utc = pytz.utc
assert utc.zone == 'UTC'
eastern = pytz.timezone('US/Eastern')
fmt = '%Y-%m-%d %H:%M:%S %Z%z'
loc_dt = eastern.localize(datetime.datetime(2026, 1, 1, 0, 0, 0))
assert loc_dt.strftime(fmt) is not None
utc_dt = loc_dt.astimezone(pytz.utc)
assert utc_dt.tzinfo is pytz.utc
EOF