TianoCore EDK2 master
|
#include <Uefi/UefiBaseType.h>
Go to the source code of this file.
Macros | |
#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
Definition in file TimeBaseLib.h.
#define EPOCH_JULIAN_DATE 2440588 |
Definition at line 49 of file TimeBaseLib.h.
#define SEC_PER_DAY ((UINTN) 86400) |
Definition at line 54 of file TimeBaseLib.h.
#define SEC_PER_HOUR ((UINTN) 3600) |
Definition at line 53 of file TimeBaseLib.h.
#define SEC_PER_MIN ((UINTN) 60) |
Definition at line 52 of file TimeBaseLib.h.
Converts EFI_TIME to Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC).
Time | The UEFI time to be converted. |
Converts EFI_TIME to Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC).
[in] | Time | a pointer to EFI_TIME abstraction. |
Definition at line 119 of file TimeBaseLib.c.
Get the day of the week from the UEFI time.
Time | The UEFI time to be calculated. |
Definition at line 142 of file TimeBaseLib.c.
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. |
Converts Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC) to EFI_TIME
Definition at line 25 of file TimeBaseLib.c.
Check if the day in the UEFI time is valid.
Time | The UEFI time to be checked. |
TRUE | Valid. |
FALSE | Invalid. |
Definition at line 196 of file TimeBaseLib.c.
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. |
Check if it is a leap year.
Time | The time to be checked. |
TRUE | It is a leap year. |
FALSE | It is NOT a leap year. |
Definition at line 289 of file RealTimeClock.c.
Check if the UEFI time is valid.
Time | The UEFI time to be checked. |
TRUE | Valid. |
FALSE | Invalid. |
Definition at line 269 of file TimeBaseLib.c.
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. |
Definition at line 249 of file TimeBaseLib.c.
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. |
Definition at line 225 of file TimeBaseLib.c.