Lines Matching defs:Time

104   EFI_TIME        Time;
155 // Get the Time/Date/Daylight Savings values.
157 Time.Second = RtcRead (RTC_ADDRESS_SECONDS);
158 Time.Minute = RtcRead (RTC_ADDRESS_MINUTES);
159 Time.Hour = RtcRead (RTC_ADDRESS_HOURS);
160 Time.Day = RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH);
161 Time.Month = RtcRead (RTC_ADDRESS_MONTH);
162 Time.Year = RtcRead (RTC_ADDRESS_YEAR);
192 Time.TimeZone = (INT16) TimerVar;
193 Time.Daylight = (UINT8) (TimerVar >> 16);
195 Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
196 Time.Daylight = 0;
202 Status = ConvertRtcTimeToEfiTime (&Time, Century, RegisterB);
204 Status = RtcTimeFieldsValid (&Time);
207 Time.Second = RTC_INIT_SECOND;
208 Time.Minute = RTC_INIT_MINUTE;
209 Time.Hour = RTC_INIT_HOUR;
210 Time.Day = RTC_INIT_DAY;
211 Time.Month = RTC_INIT_MONTH;
212 Time.Year = RTC_INIT_YEAR;
213 Time.Nanosecond = 0;
214 Time.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
215 Time.Daylight = 0;
221 Status = PcRtcSetTime (&Time, Global);
233 @param Time A pointer to storage to receive a snapshot of the current time.
239 @retval EFI_INVALID_PARAMETER Time is NULL.
245 OUT EFI_TIME *Time,
257 if (Time == NULL) {
283 // Get the Time/Date/Daylight Savings values.
285 Time->Second = RtcRead (RTC_ADDRESS_SECONDS);
286 Time->Minute = RtcRead (RTC_ADDRESS_MINUTES);
287 Time->Hour = RtcRead (RTC_ADDRESS_HOURS);
288 Time->Day = RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH);
289 Time->Month = RtcRead (RTC_ADDRESS_MONTH);
290 Time->Year = RtcRead (RTC_ADDRESS_YEAR);
304 Time->TimeZone = Global->SavedTimeZone;
305 Time->Daylight = Global->Daylight;
310 Status = ConvertRtcTimeToEfiTime (Time, Century, RegisterB);
312 Status = RtcTimeFieldsValid (Time);
339 @param Time A pointer to the current time.
349 IN EFI_TIME *Time,
359 if (Time == NULL) {
365 Status = RtcTimeFieldsValid (Time);
370 CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
420 Global->SavedTimeZone = Time->TimeZone;
421 Global->Daylight = Time->Daylight;
423 TimerVar = Time->Daylight;
424 TimerVar = (UINT32) ((TimerVar << 16) | (UINT16)(Time->TimeZone));
442 @param Time The current alarm setting.
448 @retval EFI_INVALID_PARAMETER Time is NULL.
457 OUT EFI_TIME *Time,
471 if ((Enabled == NULL) || (Pending == NULL) || (Time == NULL)) {
498 // Get the Time/Date/Daylight Savings values.
503 Time->Second = RtcRead (RTC_ADDRESS_SECONDS_ALARM);
504 Time->Minute = RtcRead (RTC_ADDRESS_MINUTES_ALARM);
505 Time->Hour = RtcRead (RTC_ADDRESS_HOURS_ALARM);
506 Time->Day = RtcRead (RTC_ADDRESS_DAY_OF_THE_MONTH);
507 Time->Month = RtcRead (RTC_ADDRESS_MONTH);
508 Time->Year = RtcRead (RTC_ADDRESS_YEAR);
509 Time->TimeZone = Global->SavedTimeZone;
510 Time->Daylight = Global->Daylight;
528 Time->Day = RtcTime.Day;
529 Time->Month = RtcTime.Month;
530 Time->Year = RtcTime.Year;
543 Status = ConvertRtcTimeToEfiTime (Time, Century, RegisterB);
545 Status = RtcTimeFieldsValid (Time);
558 @param Time If Enable is TRUE, the time to set the wakeup alarm for.
572 IN EFI_TIME *Time, OPTIONAL
586 if (Time == NULL) {
592 Status = RtcTimeFieldsValid (Time);
604 if (!IsWithinOneDay (&RtcTime, Time)) {
610 CopyMem (&RtcTime, Time, sizeof (EFI_TIME));
725 @param Time On input, the time data read from RTC to convert
737 IN OUT EFI_TIME *Time,
744 if ((Time->Hour & 0x80) != 0) {
750 Time->Hour = (UINT8) (Time->Hour & 0x7f);
753 Time->Year = CheckAndConvertBcd8ToDecimal8 ((UINT8) Time->Year);
754 Time->Month = CheckAndConvertBcd8ToDecimal8 (Time->Month);
755 Time->Day = CheckAndConvertBcd8ToDecimal8 (Time->Day);
756 Time->Hour = CheckAndConvertBcd8ToDecimal8 (Time->Hour);
757 Time->Minute = CheckAndConvertBcd8ToDecimal8 (Time->Minute);
758 Time->Second = CheckAndConvertBcd8ToDecimal8 (Time->Second);
762 if (Time->Year == 0xff || Time->Month == 0xff || Time->Day == 0xff ||
763 Time->Hour == 0xff || Time->Minute == 0xff || Time->Second == 0xff ||
768 Time->Year = (UINT16) (Century * 100 + Time->Year);
774 if (IsPM && Time->Hour < 12) {
775 Time->Hour = (UINT8) (Time->Hour + 12);
778 if (!IsPM && Time->Hour == 12) {
779 Time->Hour = 0;
783 Time->Nanosecond = 0;
834 @param Time The time to be checked.
836 @retval EFI_INVALID_PARAMETER Some fields of Time are not correct.
837 @retval EFI_SUCCESS Time is a valid EFI_TIME variable.
842 IN EFI_TIME *Time
845 if (Time->Year < 1998 ||
846 Time->Year > 2099 ||
847 Time->Month < 1 ||
848 Time->Month > 12 ||
849 (!DayValid (Time)) ||
850 Time->Hour > 23 ||
851 Time->Minute > 59 ||
852 Time->Second > 59 ||
853 Time->Nanosecond > 999999999 ||
854 (!(Time->TimeZone == EFI_UNSPECIFIED_TIMEZONE || (Time->TimeZone >= -1440 && Time->TimeZone <= 1440))) ||
855 ((Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT))) != 0)) {
865 @param Time Its Day field is to be checked.
867 @retval TRUE Day field of Time is correct.
868 @retval FALSE Day field of Time is NOT correct.
872 IN EFI_TIME *Time
891 // The validity of Time->Month field should be checked before
893 ASSERT (Time->Month >=1);
894 ASSERT (Time->Month <=12);
895 if (Time->Day < 1 ||
896 Time->Day > DayOfMonth[Time->Month - 1] ||
897 (Time->Month == 2 && (!IsLeapYear (Time) && Time->Day > 28))
908 @param Time The time to be checked.
915 IN EFI_TIME *Time
918 if (Time->Year % 4 == 0) {
919 if (Time->Year % 100 == 0) {
920 if (Time->Year % 400 == 0) {
940 @param Time On input, the time data read from UEFI to convert
943 @param Century It is set according to EFI_TIME Time.
948 IN OUT EFI_TIME *Time,
960 if (Time->Hour < 12) {
964 if (Time->Hour >= 13) {
965 Time->Hour = (UINT8) (Time->Hour - 12);
966 } else if (Time->Hour == 0) {
967 Time->Hour = 12;
971 // Set the Time/Date/Daylight Savings values.
973 *Century = DecimalToBcd8 ((UINT8) (Time->Year / 100));
975 Time->Year = (UINT16) (Time->Year % 100);
978 Time->Year = DecimalToBcd8 ((UINT8) Time->Year);
979 Time->Month = DecimalToBcd8 (Time->Month);
980 Time->Day = DecimalToBcd8 (Time->Day);
981 Time->Hour = DecimalToBcd8 (Time->Hour);
982 Time->Minute = DecimalToBcd8 (Time->Minute);
983 Time->Second = DecimalToBcd8 (Time->Second);
989 Time->Hour = (UINT8) (Time->Hour | 0x80);