]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Fix bad TimeZone (TZ) conversion.
authorAndrew Fish <afish@apple.com>
Sun, 26 Jul 2015 08:03:35 +0000 (08:03 +0000)
committerjljusten <jljusten@Edk2>
Sun, 26 Jul 2015 08:03:35 +0000 (08:03 +0000)
EFI_UNSPECIFIED_TIMEZONE means display local time. TZ of 0 is UTC.
Thus EFI_UNSPECIFIED_TIMEZONE means ignore TZ, 0 means UTC. When this code is
fixed to adust file TZ to local TZ you need to preserve
EFI_UNSPECIFIED_TIMEZONE.

FAT always return EFI_UNSPECIFIED_TIMEZONE.
Modern filesystems, HFS+, NTFS, ext3, etc store time in UTC.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18051 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLevel2CommandsLib/Ls.c

index e56b6cdb4016cc360e6e04bf7291b3b48dbab5f4..c1e2887aa1fb65c48da32e906939ebcea3a13f76 100644 (file)
@@ -725,7 +725,7 @@ ShellCommandRunLs (
             SearchString,\r
             NULL,\r
             Count,\r
-            (INT16)(TheTime.TimeZone==EFI_UNSPECIFIED_TIMEZONE?0:TheTime.TimeZone)\r
+            TheTime.TimeZone\r
            );\r
           if (ShellStatus == SHELL_NOT_FOUND) {\r
             ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LS_FILE_NOT_FOUND), gShellLevel2HiiHandle, L"ls", FullPath);  \r