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 12, 2024
1 parent 5826074 commit 5a56699
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 5a56699

Please sign in to comment.