EmbeddedPkg[all]
0.1
|
Macros | |
#define | TIME_BUILD_YEAR |
#define | TIME_BUILD_MONTH |
#define | TIME_BUILD_DAY |
#define | EPOCH_JULIAN_DATE 2440588 |
#define | SEC_PER_MIN ((UINTN) 60) |
#define | SEC_PER_HOUR ((UINTN) 3600) |
#define | SEC_PER_DAY ((UINTN) 86400) |
Functions | |
BOOLEAN EFIAPI | IsLeapYear (IN EFI_TIME *Time) |
BOOLEAN EFIAPI | IsDayValid (IN EFI_TIME *Time) |
BOOLEAN EFIAPI | IsValidTimeZone (IN INT16 TimeZone) |
BOOLEAN EFIAPI | IsValidDaylight (IN INT8 Daylight) |
BOOLEAN EFIAPI | IsTimeValid (IN EFI_TIME *Time) |
VOID EFIAPI | EpochToEfiTime (IN UINTN EpochSeconds, OUT EFI_TIME *Time) |
UINTN EFIAPI | EfiTimeToEpoch (IN EFI_TIME *Time) |
UINTN | EfiTimeToWday (IN EFI_TIME *Time) |
Copyright (c) 2016, Hisilicon Limited. All rights reserved. Copyright (c) 2016-2019, Linaro Limited. All rights reserved. Copyright (c) 2021, Ampere Computing LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define EPOCH_JULIAN_DATE 2440588 |
#define SEC_PER_DAY ((UINTN) 86400) |
#define SEC_PER_HOUR ((UINTN) 3600) |
#define SEC_PER_MIN ((UINTN) 60) |
#define TIME_BUILD_DAY |
#define TIME_BUILD_MONTH |
#define TIME_BUILD_YEAR |
UINTN EFIAPI EfiTimeToEpoch | ( | IN EFI_TIME * | Time | ) |
Converts EFI_TIME to Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC).
Time | The UEFI time to be converted. |
UINTN EfiTimeToWday | ( | IN EFI_TIME * | Time | ) |
Get the day of the week from the UEFI time.
Time | The UEFI time to be calculated. |
VOID EFIAPI EpochToEfiTime | ( | IN UINTN | EpochSeconds, |
OUT EFI_TIME * | Time | ||
) |
Converts Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC) to EFI_TIME.
EpochSeconds | Epoch seconds. |
Time | The time converted to UEFI format. |
BOOLEAN EFIAPI IsDayValid | ( | IN EFI_TIME * | Time | ) |
Check if the day in the UEFI time is valid.
Time | The UEFI time to be checked. |
TRUE | Valid. |
FALSE | Invalid. |
BOOLEAN EFIAPI IsLeapYear | ( | IN EFI_TIME * | Time | ) |
Check if it is a leap year.
Time | The UEFI time to be checked. |
TRUE | It is a leap year. |
FALSE | It is NOT a leap year. |
BOOLEAN EFIAPI IsTimeValid | ( | IN EFI_TIME * | Time | ) |
Check if the UEFI time is valid.
Time | The UEFI time to be checked. |
TRUE | Valid. |
FALSE | Invalid. |
BOOLEAN EFIAPI IsValidDaylight | ( | IN INT8 | Daylight | ) |
Check if the daylight is valid. Valid values are: 0 : Time is not affected. 1 : Time is affected, and has not been adjusted for daylight savings. 3 : Time is affected, and has been adjusted for daylight savings. All other values are invalid.
Daylight | The daylight to be checked. |
TRUE | Valid. |
FALSE | Invalid. |
BOOLEAN EFIAPI IsValidTimeZone | ( | IN INT16 | TimeZone | ) |
Check if the time zone is valid. Valid values are between -1440 and 1440 or 2047 (EFI_UNSPECIFIED_TIMEZONE).
TimeZone | The time zone to be checked. |
TRUE | Valid. |
FALSE | Invalid. |