From: Frantisek Sumsal Date: Tue, 16 Jan 2024 20:47:23 +0000 (+0100) Subject: ukify: use datetime.timezone.utc instead of datetime.UTC X-Git-Tag: v256-rc1~1129^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F30972%2Fhead;p=thirdparty%2Fsystemd.git ukify: use datetime.timezone.utc instead of datetime.UTC For compat with older Python versions, since datetime.UTC is an alias introduced in Python 3.11. --- diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 6e9d86b783d..98739969aef 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -871,7 +871,7 @@ def generate_key_cert_pair( # supported/expected: # https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-secure-boot-key-creation-and-management-guidance?view=windows-11#12-public-key-cryptography - now = datetime.datetime.now(datetime.UTC) + now = datetime.datetime.now(datetime.timezone.utc) key = rsa.generate_private_key( public_exponent=65537,