stime

Name

stime -- set time

Synopsis

#define _SVID_SOURCE  /* glibc needs this */
#include <time.h>

int stime(time_t *t);

Description

stime sets the system's idea of the time and date. Time, pointed to by t, is measured in seconds from 00:00:00 GMT January 1, 1970. stime may only be executed by the super user.

Return Value

On success, 0 is returned. On error, -1 is returned and the global variable errno is set appropriately.

Errors

EPERM

The caller is not the super-user.

Notes

Under glibc2, time.h only provides a prototype when _SVID_SOURCE is defined.