Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn> > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Guo, Gua > 发送时间: 2024年4月21日 20:51 > 收件人: devel@edk2.groups.io > 抄送: gua....@intel.com; saloni.kasbe...@intel.com; Rebecca Cran > <rebe...@bsdio.com>; Liming Gao <gaolim...@byosoft.com.cn>; Bob Feng > <bob.c.f...@intel.com>; Yuwei Chen <yuwei.c...@intel.com> > 主题: [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python > 3.12 support > > From: Gua Guo <gua....@intel.com> > > 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 <rebe...@bsdio.com> > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Cc: Bob Feng <bob.c.f...@intel.com> > Cc: Yuwei Chen <yuwei.c...@intel.com> > Signed-off-by: Gua Guo <gua....@intel.com> > --- > 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: devel+ow...@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaolim...@byosoft.com.cn] > -=-=-=-=-=-= >
-=-=-=-=-=-=-=-=-=-=-=- 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: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-