]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: test: Replace python deprecated datetime utc functions
authorMartin Basti <mbasti@isc.org>
Tue, 14 Jul 2026 13:08:01 +0000 (13:08 +0000)
committerMartin Basti <mbasti@isc.org>
Tue, 14 Jul 2026 13:08:01 +0000 (13:08 +0000)
Functions `utcnow` and `utcfromtimestamp` are deprecated in python and
print warnings into tests logs about it.

Use the python prefered way by defining `timezone.utc` in `now` and
`fromtimestamp` functions. Which are equivalent but safer than naive
objects without timezone.

To ensure comptibility `%z` was added to format string to properly
process `Z` as UTC timezone.

Assisted-by: Claude Code:claude-opus-4-8[1m]
Merge branch 'mbasti/python-fix-deprecated-utcfromtimestamp' into 'main'

See merge request isc-projects/bind9!12399


Trivial merge