mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02: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
@ -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…
x
Reference in New Issue
Block a user