[ntp:questions] adjtime limited to 2145 seconds?
santapc at gmail.com
Thu Jan 5 00:35:28 UTC 2006
Below I give a code snippet, for using adjtime() on my redhat system.
The maximum delta allowed is +/- 2145 seconds. If I give bigger than
this, then I get a EINVAL error no 22 as the delta is greater than the
maximum allowed. Is this normal?
I was trying to use "ntpdate -B <server>" which uses the adjtime always
and that gives a "Can't adjust the time of day: Invalid argument"
because of this adjtime error.
Any comments will be appreciated.
run the following as root....
int main(int argc, char *argv)
struct timeval adj, old;
printf("adjtime() successful. "
"Olddelta = %u.%06u\n",
printf("adjtime() failed, errno = %d\n",errno);
More information about the questions