From: "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
To: <devel@edk2.groups.io>, <gua.guo@intel.com>
Cc: <saloni.kasbekar@intel.com>, "'Rebecca Cran'" <rebecca@bsdio.com>,
"'Bob Feng'" <bob.c.feng@intel.com>,
"'Yuwei Chen'" <yuwei.chen@intel.com>
Subject: 回复: [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python 3.12 support
Date: Tue, 23 Apr 2024 22:41:19 +0800 [thread overview]
Message-ID: <01c101da958c$4e2cf460$ea86dd20$@byosoft.com.cn> (raw)
In-Reply-To: <20240421125033.1492-2-gua.guo@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Guo, Gua
> 发送时间: 2024年4月21日 20:51
> 收件人: devel@edk2.groups.io
> 抄送: gua.guo@intel.com; saloni.kasbekar@intel.com; Rebecca Cran
> <rebecca@bsdio.com>; Liming Gao <gaoliming@byosoft.com.cn>; Bob Feng
> <bob.c.feng@intel.com>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python
> 3.12 support
>
> From: Gua Guo <gua.guo@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 <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>
> ---
> 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+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-04-23 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 12:50 [edk2-devel] [PATCH v1 0/1] BaseTools/GetUtcDateTime.py 3.12 support Guo, Gua
2024-04-21 12:50 ` [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python " Guo, Gua
2024-04-23 14:41 ` gaoliming via groups.io [this message]
2024-04-22 1:06 ` [edk2-devel] [PATCH v1 0/1] BaseTools/GetUtcDateTime.py " Guo, Gua
2024-04-23 2:29 ` Guo, Gua
2024-04-23 2:31 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='01c101da958c$4e2cf460$ea86dd20$@byosoft.com.cn' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox