From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.64.74; helo=eur01-db5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-oln040092064074.outbound.protection.outlook.com [40.92.64.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 816652063D74E for ; Thu, 17 May 2018 05:42:51 -0700 (PDT) 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=jsQFrCzbgT1MEbTzi/iZkGStafwIaJO7kiJBTaVe3Ig=; b=fpT30HapGbyo3rOx8TDvNjpxL/+Sn3LD9eTJYRpRWF/VXZezeO6Cso7KAiLKGziabs7di0dIc4+mOO0JxZmG5DGLvUV0k2od/DzlZXMm4jAPSbKRTVi0mfKVSBNTnBOlIuzQF4xoVL/SyUFPUzOX3IlFCI1kMqoEXnMeeSpdAxAL321gy0X34poFkwx6cio64FChYtx8+86OcPDzUSMbFiXa997ithls5wzIgjva5Bey7J24AIv/1uBWibiHJts+BFvI9SMdmmUKnRmN4Uw+OD/py7wfXwbEQOtPtcqwz+J/avQ1b0ZlbKvuC+pQwZkKNdcXesPxtL97X8UvIV1j/w== Received: from HE1EUR01FT049.eop-EUR01.prod.protection.outlook.com (10.152.0.55) by HE1EUR01HT127.eop-EUR01.prod.protection.outlook.com (10.152.1.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16; Thu, 17 May 2018 12:42:49 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.0.56) by HE1EUR01FT049.mail.protection.outlook.com (10.152.0.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.776.10 via Frontend Transport; Thu, 17 May 2018 12:42:49 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7010:5d5e:8dcf:d92e]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7010:5d5e:8dcf:d92e%17]) with mapi id 15.20.0776.010; Thu, 17 May 2018 12:42:48 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "jaben.carsey@intel.com" , "ruiyu.ni@intel.com" Thread-Topic: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone. Thread-Index: AQHT7dyPP02JU0LAdUmmha366FmPxg== Date: Thu, 17 May 2018 12:42:48 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM5PR0701CA0067.eurprd07.prod.outlook.com (2603:10a6:203:2::29) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:65247C8E4FD99F98ED6B87FCBD3F3C9ADC688463D95EA7F2416B91A5C6A7D8D0; UpperCasedChecksum:D5B87E46B3B23D6DD1550A1D30AFDE65F2D8420591DD1F977A292D56CC7F72BA; SizeAsReceived:7519; Count:48 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [gGK3MWMm9rHcSZcUxPgx8g4i1cREw8CG] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR01HT127; 7:yKN97Fcd80EoR/w/4XiuLW/HVuKJbRe8KpOJGl+t6gUPViJ3cYT4j5tEJDczx6I3GvkyTAY0tHs+5hH6l7m76l0SoNTUfPzL+6MvGNOKgHfwsSbFbJiw1hx7D0KReO/F11zBM6JNX+PpVv0X47IcUJC9+DhHXrdiwGqz/WQlS55HanJyyQxlPnuyN2BQY2P5BPrNWQ4iNyq8RtqC8HLaP1LhoTmgd+DGOD6/I+U33Mk8Zai9jSnxkPNLPHt1hnZj x-incomingheadercount: 48 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125466)(1603101448)(1701031045); SRVR:HE1EUR01HT127; x-ms-traffictypediagnostic: HE1EUR01HT127: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:HE1EUR01HT127; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR01HT127; x-forefront-prvs: 067553F396 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(189003)(199004)(26005)(72206003)(7696005)(386003)(59450400001)(99286004)(2351001)(74316002)(486006)(6346003)(14454004)(476003)(426003)(86362001)(2900100001)(102836004)(54906003)(15760500003)(25786009)(97736004)(87572001)(4326008)(20460500001)(68736007)(6436002)(5640700003)(33656002)(104016004)(8676002)(8936002)(3660700001)(305945005)(82202002)(5250100002)(2501003)(105586002)(3280700002)(5660300001)(55016002)(106356001)(81156014)(6916009)(19627235001); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR01HT127; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: 5b1fUXLQ4h7aCKPSwawTOPYY77TYghWgwOM5SXaa6kD0X3fce79rofK1zam88nq+BN8pwLnxEtM10A8ILAX2ydTodn+UNW6BKGDaEVCTQZlKNJP7aKmQr5TVoA7z1kUQmQlGpqaKgYb9JBSiZVdIRIe4nv6nmOBEgIjvnN677bvmntEMPA9aHqMJDIoe1278 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: fbadd691-2f7c-416d-1863-08d5bbf3b230 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: fbadd691-2f7c-416d-1863-08d5bbf3b230 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2018 12:42:48.8580 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR01HT127 Subject: [PATCH v2] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 12:42:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone, such as when SetTime() has not been called after the PC-AT CMOS RTC was cut off power. Consider this case by not attempting Timezone translations for when it is invalid. V2: - Do not change the copyright date as requested. - Added R-bs from V1 as no functional changes have been made. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser Reviewed-by: Jaben Carsey Reviewed-by: Ruiyu Ni --- 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 7d2e15f5206b..e502685a1dbb 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c @@ -506,7 +506,7 @@ PrintLsOutput( // Change the file time to local time. // Status =3D gRT->GetTime(&LocalTime, NULL); - if (!EFI_ERROR (Status)) { + if (!EFI_ERROR (Status) && (LocalTime.TimeZone !=3D EFI_UNSPECIFIED_= TIMEZONE)) { if ((Node->Info->CreateTime.TimeZone !=3D EFI_UNSPECIFIED_TIMEZONE= ) && (Node->Info->CreateTime.Month >=3D 1 && Node->Info->CreateTime= .Month <=3D 12)) { // --=20 2.17.0.windows.1