The following functions from the POSIX specification are included for convenience:
extern char **environ variable (for setting up the environment for use with getenv()) |
_exit() |
strtok_r() |
rand_r() |
asctime_r() |
ctime_r() |
localtime_r() |
gmtime_r() |
eCos provides the following additional implementation-specific functions within the standard C library to adjust the date and time settings:
void cyg_libc_time_setdst
( cyg_libc_time_dst state );This function sets the state of Daylight Savings Time. The values for state are:
CYG_LIBC_TIME_DSTNA unknown |
CYG_LIBC_TIME_DSTOFF off |
CYG_LIBC_TIME_DSTON on |
void cyg_libc_time_setzoneoffsets
( time_t stdoffset, time_t dstoffset );This function sets the offsets from UTC used when Daylight Savings Time is enabled or disabled. The offsets are in time_t’s, which are seconds in the current inplementation.
Cyg_libc_time_dst cyg_libc_time_getzoneoffsets
( time_t *stdoffset,
time_t *dstoffset );This function retrieves the current setting for Daylight Savings Time along with the offsets used for both STD and DST. The offsets are both in time_t’s, which are seconds in the current implementation.
cyg_bool cyg_libc_time_settime
( time_t utctime );This function sets the current time for the system The time is specified as a time_t in UTC. It returns non-zero on error.