Settime() – Intel Extensible Firmware Interface User Manual
Page 205
Services
— Runtime Services
Version 1.10
12/01/02
6-13
SetTime()
Summary
Sets the current local time and date information.
Prototype
EFI_STATUS
SetTime (
IN
EFI_TIME
*Time
);
Parameters
Time
A pointer to the current time. Type
EFI_TIME
is defined in the
function description. Full error checking is performed on
the different fields of the
EFI_TIME
structure (refer to the
EFI_TIME
definition in the
GetTime()
function description for full details), and
EFI_INVALID_PARAMETER
is returned if any field is out of range.
Description
The
SetTime()
function sets the real time clock device to the supplied time, and records the
current time zone and daylight savings time information. The
SetTime()
function is not allowed
to loop based on the current time. For example, if the device does not support a hardware reset for
the sub-resolution time, the code is not to implement the feature by waiting for the time to wrap.
During runtime, if a PC-AT CMOS device is present in the platform the caller must synchronize
access to the device before calling
SetTime()
.
Status Codes Returned
EFI_SUCCESS
The operation completed successfully.
EFI_INVALID_PARAMETER
A time field is out of range.
EFI_DEVICE_ERROR
The time could not be set due to a hardware error.