From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id BE8167803CC for ; Sun, 21 Apr 2024 12:50:44 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Sj43MpBEhMeOMkA56vyjCBrBWbH+sGQN7c6hSTOQzWo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1713703843; v=1; b=yWCY22ftBarzsEDF2haUl4bevGzT8+zSBOrE022/b3wZfexE3eYdtHC+rTcJKjSu+XJWNxGX ebz9SOY9ElpICU1C8lglbWcDDTyvwuDoykrqPF8bYM4rMSEkEFqixMtRvaA0lJywHUh0249oivs 5Xjppeei155zP9FLeZgdpy/uK1nB3ciG/qFbyaGQb6iJSD5dzdnxmMkQUEK/koeHgQrgMGCtWvz cFWZIhcUe5kfsyOVrVNrahGi8aeDdYbhbNOgI1XbUCN7itK+lr0ALP45kPOYywq59OoO/zrtHjO OvSJyZ4woCLEeQD5B6CL0Vd72nDSFLaK7+ACaa1hxAjMg== X-Received: by 127.0.0.2 with SMTP id kMO7YY7687511xPgjKT97S4A; Sun, 21 Apr 2024 05:50:43 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web10.31442.1713703841003115181 for ; Sun, 21 Apr 2024 05:50:42 -0700 X-CSE-ConnectionGUID: yTEHEpByT8W+yRQI5I2yRQ== X-CSE-MsgGUID: e9Md/ucVQqaBk3W48aKH0w== X-IronPort-AV: E=McAfee;i="6600,9927,11050"; a="20650444" X-IronPort-AV: E=Sophos;i="6.07,218,1708416000"; d="scan'208";a="20650444" X-Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2024 05:50:41 -0700 X-CSE-ConnectionGUID: L+DgOrY+QlSErHA1fgCUQQ== X-CSE-MsgGUID: oaXPir0oQQa5oGiE0EkiJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,218,1708416000"; d="scan'208";a="28432216" X-Received: from gguo-desk.gar.corp.intel.com ([10.225.76.26]) by fmviesa004.fm.intel.com with ESMTP; 21 Apr 2024 05:50:38 -0700 From: "Guo, Gua" To: devel@edk2.groups.io Cc: gua.guo@intel.com, saloni.kasbekar@intel.com, Rebecca Cran , Liming Gao , Bob Feng , Yuwei Chen Subject: [edk2-devel] [PATCH v1 1/1] BaseTools/GetUtcDateTime.py: Python 3.12 support Date: Sun, 21 Apr 2024 20:50:33 +0800 Message-Id: <20240421125033.1492-2-gua.guo@intel.com> In-Reply-To: <20240421125033.1492-1-gua.guo@intel.com> References: <20240421125033.1492-1-gua.guo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Sun, 21 Apr 2024 05:50:42 -0700 Resent-From: gua.guo@intel.com Reply-To: devel@edk2.groups.io,gua.guo@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: PtthMqj18ZQpjROPZR8iKffvx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=yWCY22ft; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io From: Gua Guo 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 Cc: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Signed-off-by: Gua Guo --- BaseTools/Scripts/GetUtcDateTime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Scripts/GetUtcDateTime.py b/BaseTools/Scripts/GetUtc= DateTime.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")=0D PARSER.print_help()=0D =0D - today =3D datetime.datetime.utcnow()=0D + today =3D datetime.datetime.now(datetime.UTC)=0D if ARGS.year:=0D ReversedNumber =3D str(today.year)[::-1]=0D print (''.join(hex(ord(HexString))[2:] for HexString in ReversedNu= mber))=0D --=20 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-