summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
index 64dfae3291..ac71350ef4 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
@@ -538,7 +538,11 @@ ShellCommandRunLs (
StrnCatGrow(&FullPath, NULL, L"*", 0);
}
Status = gRT->GetTime(&TheTime, NULL);
- ASSERT_EFI_ERROR(Status);
+ if (EFI_ERROR(Status)) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"gRT->GetTime", Status);
+ TheTime.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
+ }
+
SfoMode = ShellCommandLineGetFlag(Package, L"-sfo");
if (ShellStatus == SHELL_SUCCESS) {
ShellStatus = PrintLsOutput(
@@ -548,7 +552,7 @@ ShellCommandRunLs (
FullPath,
TRUE,
Count,
- (INT16)(TheTime.TimeZone==2047?0:TheTime.TimeZone)
+ (INT16)(TheTime.TimeZone==EFI_UNSPECIFIED_TIMEZONE?0:TheTime.TimeZone)
);
if (ShellStatus == SHELL_NOT_FOUND) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_FILES), gShellLevel2HiiHandle);