From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.738.1571879946161538163 for ; Wed, 23 Oct 2019 18:19:06 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zhichao.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 18:19:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,222,1569308400"; d="scan'208";a="373060116" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 23 Oct 2019 18:19:05 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 23 Oct 2019 18:19:04 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 23 Oct 2019 18:19:04 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.165]) with mapi id 14.03.0439.000; Thu, 24 Oct 2019 09:19:03 +0800 From: "Gao, Zhichao" To: =?iso-8859-1?Q?Marvin_H=E4user?= , "devel@edk2.groups.io" CC: "vit9696@protonmail.com" , "Ni, Ray" Subject: Re: [PATCH] ShellPkg/Ls: Consider UEFI timezone may not be set Thread-Topic: [PATCH] ShellPkg/Ls: Consider UEFI timezone may not be set Thread-Index: AQHVhz8XTOe7XsZJoUKZMjl7UVCOUadpA2kQ Date: Thu, 24 Oct 2019 01:19:02 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B85A6DE@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zhichao Gao > -----Original Message----- > From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] > Sent: Sunday, October 20, 2019 8:09 PM > To: devel@edk2.groups.io > Cc: vit9696@protonmail.com; Ni, Ray ; Gao, Zhichao > > Subject: [PATCH] ShellPkg/Ls: Consider UEFI timezone may not be set >=20 > From: Marvin Haeuser >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2294 >=20 > EFI_RUNTIME_SERVICES.GetTime() might return an unspecified Timezone, > such as when SetTime() has not been called after the RTC was cut off powe= r. > Consider this case by not attempting Timezone translations for when it is > invalid. >=20 > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Marvin Haeuser > --- > ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c > b/ShellPkg/Library/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. // Status =3D g= RT- > >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)) > { //-- > 2.23.0.windows.1