mirror of https://github.com/acidanthera/audk.git
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:
parent
8f5b265500
commit
70565e6422
|
@ -9,7 +9,7 @@
|
|||
it may cause the table to be initaliized with the members at the end being
|
||||
set to zero. This is bad as jumping to zero will crash.
|
||||
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
|
@ -363,7 +363,7 @@ SecGetTime (
|
|||
Time->Minute = tm->tm_min;
|
||||
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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue