EmulatorPkg/Unix: Convert timezone from seconds to minutes

Fixes and assert seen when running ls under the shell. It appears the
assert was added in:

commit 99849a906e

    ShellPkg/ls: Display the file time in local time.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
Jordan Justen
2019-07-12 17:34:55 -07:00
parent 8f5b265500
commit 70565e6422
2 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
POSIX Pthreads to emulate APs and implement threads
Copyright (c) 2011, Apple Inc. All rights reserved.
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@ -220,7 +221,7 @@ PosixSystemTimeToEfiTime (
Time->Second = tm->tm_sec;
Time->Nanosecond = 0;
Time->TimeZone = timezone;
Time->TimeZone = timezone / 60;
Time->Daylight = (daylight ? EFI_TIME_ADJUST_DAYLIGHT : 0) | (tm->tm_isdst > 0 ? EFI_TIME_IN_DAYLIGHT : 0);
}