Skip to content

Commit

Permalink
ukify: use datetime.timezone.utc instead of datetime.UTC
Browse files Browse the repository at this point in the history
For compat with older Python versions, since datetime.UTC is an alias
introduced in Python 3.11.

(cherry picked from commit a165918)
  • Loading branch information
mrc0mmand authored and bluca committed Feb 11, 2024
1 parent 46db4c2 commit 8b5804e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ukify/ukify.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,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,
Expand Down

0 comments on commit 8b5804e

Please sign in to comment.