> - if ((Time->Hour & 0x80) != 0) { > - IsPM = TRUE; > - } else { > - IsPM = FALSE; > + // Check 24-hour format situation > + if (RegisterB.Bits.Mil == 1) { > + if (RegisterB.Bits.Dm == 0) { > + if (Time->Hour > 0x23) { > + return EFI_INVALID_PARAMETER; > + } > + } else { > + if (Time->Hour > 0x17) { > + return EFI_INVALID_PARAMETER; > + } > + } > + } > + > + // IsPM only makes sense for 12-hour format. > + if (RegisterB.Bits.Mil == 0) { > + if ((Time->Hour & 0x80) != 0) { > + IsPM = TRUE; > + } else { > + IsPM = FALSE; > + } > } >
Is it possible to remove above check? RtcTimeFieldsValid() already does the check. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#89573): https://edk2.groups.io/g/devel/message/89573 Mute This Topic: https://groups.io/mt/90947516/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-