diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-24 06:57:57 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-24 06:57:57 +0000 |
commit | 24e12917a450d8f434cc23601f98d8b430400db5 (patch) | |
tree | d9b2654a90371df0fb949d63c88593d01b4d2ec0 /Nt32Pkg/RealTimeClockRuntimeDxe | |
parent | 32fa3543c9d9146724297b18872bb354081892f5 (diff) | |
download | edk2-platforms-24e12917a450d8f434cc23601f98d8b430400db5.tar.xz |
Enable the SE_TIME_ZONE_NAME privilege for NT32 to fix SetTime function test running in Win7
Fix the GetTime implementation to return the correct Daylight value.
Signed-off-by: niruiyu
Reviewed-by: erictian
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12559 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/RealTimeClockRuntimeDxe')
-rw-r--r-- | Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c index 929ceb55f6..6a44875503 100644 --- a/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -1,6 +1,6 @@ /**@file
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -109,7 +109,7 @@ Returns: Time->Daylight = 0;
if (TimeZone.StandardDate.wMonth) {
- Time->Daylight = EFI_TIME_ADJUST_DAYLIGHT;
+ Time->Daylight = (UINT8) TimeZone.StandardDate.wMonth;
}
return EFI_SUCCESS;
@@ -162,7 +162,10 @@ Returns: gWinNt->GetTimeZoneInformation (&TimeZone);
TimeZone.StandardDate.wMonth = Time->Daylight;
TimeZone.Bias = Time->TimeZone;
- gWinNt->SetTimeZoneInformation (&TimeZone);
+ Flag = gWinNt->SetTimeZoneInformation (&TimeZone);
+ if (!Flag) {
+ return EFI_DEVICE_ERROR;
+ }
SystemTime.wYear = Time->Year;
SystemTime.wMonth = Time->Month;
|