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>
This commit is contained in:
Pankaj Kumar Singh 2025-06-24 14:53:40 +05:30 committed by mergify[bot]
parent 1cd24ff130
commit 4fa354b116

View file

@ -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)) ||