]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c
Enable the SE_TIME_ZONE_NAME privilege for NT32 to fix SetTime function test running...
[mirror_edk2.git] / Nt32Pkg / RealTimeClockRuntimeDxe / RealTimeClock.c
index 929ceb55f63afab5e0242f228732023868c7bb43..6a448755033827e32abbd0b013224859383f8a1c 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -109,7 +109,7 @@ Returns:
 \r
   Time->Daylight = 0;\r
   if (TimeZone.StandardDate.wMonth) {\r
-    Time->Daylight = EFI_TIME_ADJUST_DAYLIGHT;\r
+    Time->Daylight = (UINT8) TimeZone.StandardDate.wMonth;\r
   }\r
 \r
   return EFI_SUCCESS;\r
@@ -162,7 +162,10 @@ Returns:
   gWinNt->GetTimeZoneInformation (&TimeZone);\r
   TimeZone.StandardDate.wMonth  = Time->Daylight;\r
   TimeZone.Bias                 = Time->TimeZone;\r
-  gWinNt->SetTimeZoneInformation (&TimeZone);\r
+  Flag = gWinNt->SetTimeZoneInformation (&TimeZone);\r
+  if (!Flag) {\r
+    return EFI_DEVICE_ERROR;\r
+  }\r
 \r
   SystemTime.wYear          = Time->Year;\r
   SystemTime.wMonth         = Time->Month;\r