TianoCore EDK2 master
|
#include <Uefi/UefiBaseType.h>
#include <Uefi/UefiSpec.h>
#include <Library/DebugLib.h>
#include <Library/TimeBaseLib.h>
Go to the source code of this file.
Functions | |
VOID EFIAPI | EpochToEfiTime (IN UINTN EpochSeconds, OUT EFI_TIME *Time) |
UINTN EFIAPI | EfiGetEpochDays (IN EFI_TIME *Time) |
UINTN EFIAPI | EfiTimeToEpoch (IN EFI_TIME *Time) |
UINTN | EfiTimeToWday (IN EFI_TIME *Time) |
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) |
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.c.
Calculate Epoch days.
Time | The UEFI time to be calculated. |
Definition at line 87 of file TimeBaseLib.c.
Converts EFI_TIME to Epoch seconds (elapsed since 1970 JANUARY 01, 00:00:00 UTC).
Time | The UEFI time to be converted. |
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. |
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. |
Definition at line 166 of file TimeBaseLib.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.