From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 53715203B8CCD for ; Thu, 17 May 2018 01:03:04 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2018 01:03:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,409,1520924400"; d="scan'208";a="49961821" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 17 May 2018 01:03:03 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 01:03:03 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 17 May 2018 01:03:03 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.240]) by shsmsx102.ccr.corp.intel.com ([169.254.2.79]) with mapi id 14.03.0319.002; Thu, 17 May 2018 16:03:00 +0800 From: "Ni, Ruiyu" To: =?iso-8859-1?Q?Marvin_H=E4user?= , "edk2-devel@lists.01.org" CC: "Carsey, Jaben" Thread-Topic: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone. Thread-Index: AQHT5K7o92gCicGCxUSYAwEfJc4i7aQzoVsA Date: Thu, 17 May 2018 08:02:58 +0000 Deferred-Delivery: Thu, 17 May 2018 08:03:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BC9E8B9@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] 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 08:03:04 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: edk2-devel On Behalf Of Marvin > H=E4user > Sent: Sunday, May 6, 2018 4:23 AM > To: edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Ni, Ruiyu > Subject: [edk2] [PATCH] ShellPkg/UefiShellLevel2CommandsLib: Support > unspecified local Timezone. >=20 > 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. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c > b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c > index 7d2e15f5206b..73804b4516ba 100644 > --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c > +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c > @@ -2,7 +2,7 @@ > Main file for ls shell level 2 function. >=20 > (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
> - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License > which accompanies this distribution. The full text of the license may= be > found at > @@ -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_TIMEZO= NE) > && > (Node->Info->CreateTime.Month >=3D 1 && Node->Info- > >CreateTime.Month <=3D 12)) { > // > -- > 2.17.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel