From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.92.68.98]) by mx.groups.io with SMTP id smtpd.web11.1553.1571573314610342564 for ; Sun, 20 Oct 2019 05:08:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=oRy0U9QQ; spf=pass (domain: outlook.com, ip: 40.92.68.98, mailfrom: marvin.haeuser@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TddBKJTiImI6z0xrSQdWrVIXmB/QiQfnT0Q4nF887YHDUf5U/arB/KT4zgm88HqAE8kEa7YW30TSPeBx3tW9zdSXWKcTCN9WCUlkuwP7RIWcAdUZwHAQcTfGwO/iRPRtodmqrBgVfrP488RdhNdk8EF2IOBo89WdOZt7BkjPjQmqyrrqcmJAn9R9FrlF8nd7Bky45f5S6u7kwqlyiQDQRVBC3jdHxhXFoLbDHBlCd5gGXtm5QWucdxneTx9BpmLNLsqI2ygszQUliY+IUPQ51PDVRMjuNKPnQ25TauZAjfpW3n3yICJiYYojomQRkDleJL5iGoSwbNt/mOyYWV8cKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=shBgB9+aZqKBoHdu+Z096+itSPIFMJwWWwRvnz6nLAQ=; b=MLmTIGSfUrCnVAQzDbn7t3TaiwMR08Iv5pK8Wk4GWe3UjoJRcM/FrHiam7CLvqZb5J702SIz67lK5M+4slt/ZL2GzKRPzL5lwMI3P8R1d1WD0trGmtJVeuX3yGbMde3pnhwRNVDwEUIuKRrBfm0QD8BfAdvc282yX/xUNQswpxWD7mWMYr32YQuldVTeskMpww5Yc5dwhkgBKXHEP/jXJj2D1Mc1jYdCi+EVlDGu8a5+685e4Lgo018EiVX395ErOSQbHfBQEVBoyRdlcbomDquNcCdDPXlRlmcjCNyRmIFOCACdf8WDlPqMzlCm5MV6Hm5BZbmAwusQCzEOtPex4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=shBgB9+aZqKBoHdu+Z096+itSPIFMJwWWwRvnz6nLAQ=; b=oRy0U9QQa6HJxxfuBlyGl85VNVszofs0cu9M2q4/RapVexeKdBNO49LaG60zC/Cn8I9XVdpLtTvCUpn4YXE7K9uZxaDMsK7ZVheDoQZsl09hgAmAfxRkst9YQ+fkuNQC6WSnSJDkYqUdMVLzyDr0bmH5ENxyj+ASfLI2TSU0lRy5uQElijzZB724STFS1Z6Pa32p9WbjlQOBrlCtwEOSoIn3oiIcgSpWAZkPigzREmEUKaiPbOAim2OA1PJ/txO5WXGdMceqNB+JfsfoL2a3lPlsVPP6I0ImsZ1Mgn7Sb4x5dAMMHqyU8gR2mLt7PzA7Gp4la8gO9z3jvpGonjMfjg== Received: from VE1EUR02FT003.eop-EUR02.prod.protection.outlook.com (10.152.12.57) by VE1EUR02HT087.eop-EUR02.prod.protection.outlook.com (10.152.13.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14; Sun, 20 Oct 2019 12:08:32 +0000 Received: from DB7PR07MB4917.eurprd07.prod.outlook.com (10.152.12.58) by VE1EUR02FT003.mail.protection.outlook.com (10.152.12.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.14 via Frontend Transport; Sun, 20 Oct 2019 12:08:32 +0000 Received: from DB7PR07MB4917.eurprd07.prod.outlook.com ([fe80::1b8:f59a:96de:82ef]) by DB7PR07MB4917.eurprd07.prod.outlook.com ([fe80::1b8:f59a:96de:82ef%3]) with mapi id 15.20.2367.021; Sun, 20 Oct 2019 12:08:32 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "devel@edk2.groups.io" CC: "vit9696@protonmail.com" , Ray Ni , Zhichao Gao Subject: [PATCH] ShellPkg/Ls: Consider UEFI timezone may not be set Thread-Topic: [PATCH] ShellPkg/Ls: Consider UEFI timezone may not be set Thread-Index: AQHVhz8XTOe7XsZJoUKZMjl7UVCOUQ== Date: Sun, 20 Oct 2019 12:08:32 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR01CA0052.eurprd01.prod.exchangelabs.com (2603:10a6:208:e6::29) To DB7PR07MB4917.eurprd07.prod.outlook.com (2603:10a6:10:5f::30) x-incomingtopheadermarker: OriginalChecksum:8A737CFF0F826060BEDD8F459911DD55C92BF8E8D483DA61D6F61430B0E19575;UpperCasedChecksum:4C0975A664AC64CACA666E5DE809A75E01ACD3681227754F4D1895EA3882CCC4;SizeAsReceived:7769;Count:51 x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0.windows.1 x-tmn: [UvU2SVZusmffP9FsC/A2u/IKRpB52ORH] x-microsoft-original-message-id: x-ms-publictraffictype: Email x-incomingheadercount: 51 x-eopattributedmessage: 0 x-ms-traffictypediagnostic: VE1EUR02HT087: x-ms-exchange-purlcount: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lU3X3ug1CZlw4au6IZihdj+zA/OhFmChSW0+UF3wX3DfnfMF/RBr6fNTpKp1xVZNR7/zDXcHbIHAKerXfuXcpw8gsHL3s9uFf8QWIeSp2xO/2ZtajlPjC4BzZVUjiiQoHWNzTdavsy24oNeDrgrXDzyhimeGhB3g6hLw6JIqGh17I7mxPaZRmF9iISQrOPBd9sUH0NgPU5uSGRRlx+6iVCgpbu5ujlIkTM58AvcjEPo= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 49718496-3fb0-4927-0684-08d755563968 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2019 12:08:32.0705 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR02HT087 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable From: Marvin Haeuser REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2294 EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone, such as when SetTime() has not been called after the RTC was cut off power. Consider this case by not attempting Timezone translations for when it is invalid. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Marvin Haeuser --- ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Li= brary/UefiShellLevel2CommandsLib/Ls.c index adeb987e6ecb..1a65f60c3b44 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c @@ -500,7 +500,7 @@ PrintLsOutput( // Change the file time to local time.=0D //=0D Status =3D gRT->GetTime(&LocalTime, NULL);=0D - if (!EFI_ERROR (Status)) {=0D + if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=3D EFI_UNSPECIFIED_= TIMEZONE)) {=0D if ((Node->Info->CreateTime.TimeZone !=3D EFI_UNSPECIFIED_TIMEZONE= ) &&=0D (Node->Info->CreateTime.Month >=3D 1 && Node->Info->CreateTime= .Month <=3D 12)) {=0D //=0D --=20 2.23.0.windows.1