The date management utilities and API is summarized in the following table:
Function |
Description |
---|---|
date() |
Print or/and set the date |
settimeoftheday() |
System call to set the time of the day |
gettimeoftheday() |
System call to get the time of the day |
adjtime() |
System call to adjust the time of the day smoothly (used by the Network Time Protocol, NTP) |
ctime() |
Returns time argument as local time in ASCII string |
localtime() |
Returns time argument as local time in a structure |
gmtime() |
Returns time argument without local adjustment |
asctime() |
Returns ASCII time from time structure argument |
mktime() |
Returns time value from time structure argument |
strftime() |
Format printf like time from structure argument |
tzset() |
Set time zone information for time conversion routines |