Query: time
OS: minix
Section: 2
Links: minix man pages all man pages
Forums: forum home forum categories
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
TIME(2) System Calls Manual TIME(2)NAMEtime, stime - get/set date and timeSYNOPSIS#include <sys/types.h> #include <time.h> time_t time(time_t *tp) int stime(time_t *tp)DESCRIPTIONThe system's notion of the current Greenwich time is obtained with the time call, and set with the stime call. The time is expressed in seconds since midnight (0 hour), January 1, 1970. The time is both returned by time and stored in the variable pointed to by tp unless tp is the null pointer. Stime obtains the time to set from the variable pointed to by tp. Only the super-user may set the time of day.RETURNA 0 return value from stime indicates that the call succeeded. Time returns the current time on success. A -1 return value indicates an error occurred, and in this case an error code is stored into the global variable errno.ERRORSThe following error codes may be set in errno: [EFAULT] The tp address referenced invalid memory. [EPERM] A user other than the super-user attempted to set the time.SEE ALSOdate(1), ctime(3). 4th Berkeley Distribution May 14, 1986 TIME(2)