summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
index 780b39e2fd..abefee3f3a 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/TimeDate.c
@@ -298,7 +298,7 @@ CheckAndSetTime (
if (TimeString != NULL && !InternalIsTimeLikeString(TimeString, L':', 1, 2, FALSE)) {
return (SHELL_INVALID_PARAMETER);
}
- if (((Daylight & (EFI_TIME_IN_DAYLIGHT|EFI_TIME_ADJUST_DAYLIGHT)) != Daylight)) {
+ if (Daylight != 0xFF &&((Daylight & (EFI_TIME_IN_DAYLIGHT|EFI_TIME_ADJUST_DAYLIGHT)) != Daylight)) {
return (SHELL_INVALID_PARAMETER);
}
@@ -341,7 +341,9 @@ CheckAndSetTime (
TheTime.TimeZone = Tz;
}
- TheTime.Daylight = Daylight;
+ if (Daylight != 0xFF) {
+ TheTime.Daylight = Daylight;
+ }
Status = gRT->SetTime(&TheTime);