summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPankaj Kumar Singh <pansing@qti.qualcomm.com>2025-06-24 14:53:40 +0530
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-06-26 18:40:15 +0000
commit4fa354b11628a488fa2a227ecd231034cf74e4ea (patch)
tree45d3aa42d8b55fec62977e45f89ba57dc30283b3
parent1cd24ff1302677a458b550c524090fd86717d848 (diff)
downloadedk2-4fa354b11628a488fa2a227ecd231034cf74e4ea.zip
edk2-4fa354b11628a488fa2a227ecd231034cf74e4ea.tar.gz
edk2-4fa354b11628a488fa2a227ecd231034cf74e4ea.tar.bz2
EmbeddedPkg/TimeBaseLib: aligning year with UEFI specification
According to the UEFI Specification version 2.11, the valid range for the Year field in the EFI_TIME structure is from 1900 to 9999. Currently IsTimeValid() checks a restricted range 2000 - 2099. Update range in TimeBaseLib.c to match UEFI specification. Signed-off-by: Pankaj Singh <pansing@qti.qualcomm.com>
-rw-r--r--EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c b/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
index b03c237..9341a22 100644
--- a/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
+++ b/EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.c
@@ -271,8 +271,8 @@ IsTimeValid (
)
{
// Check the input parameters are within the range specified by UEFI
- if ((Time->Year < 2000) ||
- (Time->Year > 2099) ||
+ if ((Time->Year < 1900) ||
+ (Time->Year > 9999) ||
(Time->Month < 1) ||
(Time->Month > 12) ||
(!IsDayValid (Time)) ||