Reviewed-by: Liming Gao <[email protected]> > -----邮件原件----- > 发件人: [email protected] <[email protected]> 代表 Guo, Gua > 发送时间: 2024年4月21日 20:51 > 收件人: [email protected] > 抄送: [email protected]; [email protected]; Rebecca Cran > <[email protected]>; Liming Gao <[email protected]>; Bob Feng > <[email protected]>; Yuwei Chen <[email protected]> > 主题: [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python > 3.12 support > > From: Gua Guo <[email protected]> > > 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 <[email protected]> > Cc: Liming Gao <[email protected]> > Cc: Bob Feng <[email protected]> > Cc: Yuwei Chen <[email protected]> > Signed-off-by: Gua Guo <[email protected]> > --- > BaseTools/Scripts/GetUtcDateTime.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/BaseTools/Scripts/GetUtcDateTime.py > b/BaseTools/Scripts/GetUtcDateTime.py > index 3cfb6ac2ae..6764fb22a7 100644 > --- a/BaseTools/Scripts/GetUtcDateTime.py > +++ b/BaseTools/Scripts/GetUtcDateTime.py > @@ -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.UTC) > > if ARGS.year: > > ReversedNumber = str(today.year)[::-1] > > print (''.join(hex(ord(HexString))[2:] for HexString in > ReversedNumber)) > > -- > 2.39.2.windows.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#118054): > https://edk2.groups.io/g/devel/message/118054 > Mute This Topic: https://groups.io/mt/105650842/4905953 > Group Owner: [email protected] > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [[email protected]] > -=-=-=-=-=-= >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118145): https://edk2.groups.io/g/devel/message/118145 Mute This Topic: https://groups.io/mt/105690657/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
