]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c
ShellPkg/Ls: Consider UEFI timezone may not be set
[mirror_edk2.git] / ShellPkg / Library / UefiShellLevel2CommandsLib / Ls.c
index adeb987e6ecba93fd65d414bb301c73814b76467..1a65f60c3b44bd723e4870b95a75c982f453b325 100644 (file)
@@ -500,7 +500,7 @@ PrintLsOutput(
       // Change the file time to local time.\r
       //\r
       Status = gRT->GetTime(&LocalTime, NULL);\r
-      if (!EFI_ERROR (Status)) {\r
+      if (!EFI_ERROR (Status) && (LocalTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE)) {\r
         if ((Node->Info->CreateTime.TimeZone != EFI_UNSPECIFIED_TIMEZONE) &&\r
             (Node->Info->CreateTime.Month >= 1 && Node->Info->CreateTime.Month <= 12)) {\r
           //\r