mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
BaseTools/GetUtcDateTime.py: Python 3.12 support
Ref to https://docs.python.org/3/whatsnew/3.12.html utcnow() and utcfromtimestamp() are deprecated Prevent use it cause build error. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
parent
66c24219ad
commit
c0dfe3ec1f
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ def Main():
|
|||
print ("ERROR: At least one argument is required!\n")
|
||||
PARSER.print_help()
|
||||
|
||||
today = datetime.datetime.utcnow()
|
||||
today = datetime.datetime.now(datetime.timezone.utc)
|
||||
if ARGS.year:
|
||||
ReversedNumber = str(today.year)[::-1]
|
||||
print (''.join(hex(ord(HexString))[2:] for HexString in ReversedNumber))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue