From: "Marvin Häuser" <Marvin.Haeuser@outlook.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "jaben.carsey@intel.com" <jaben.carsey@intel.com>,
"ruiyu.ni@intel.com" <ruiyu.ni@intel.com>
Subject: [PATCH] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone.
Date: Sat, 5 May 2018 20:23:19 +0000 [thread overview]
Message-ID: <VI1PR0801MB179001842ACC49D94BC5A34880850@VI1PR0801MB1790.eurprd08.prod.outlook.com> (raw)
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.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
---
ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
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 = gRT->GetTime(&LocalTime, NULL);
- if (!EFI_ERROR (Status)) {
+ if (!EFI_ERROR (Status) && (LocalTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE)) {
if ((Node->Info->CreateTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE) &&
(Node->Info->CreateTime.Month >= 1 && Node->Info->CreateTime.Month <= 12)) {
//
--
2.17.0.windows.1
next reply other threads:[~2018-05-05 20:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-05 20:23 Marvin Häuser [this message]
2018-05-07 18:10 ` [PATCH] ShellPkg/UefiShellLevel2CommandsLib: Support unspecified local Timezone Carsey, Jaben
2018-05-17 8:02 ` Ni, Ruiyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR0801MB179001842ACC49D94BC5A34880850@VI1PR0801MB1790.eurprd08.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox