Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!rice!sun-spots-request From: domae@nrtc.northrop.com Newsgroups: comp.sys.sun Subject: "date -a" bug? under SunOS4.1 Keywords: SunOS Message-ID: <1990Oct7.235031.9007@rice.edu> Date: 7 Oct 90 21:30:00 GMT Sender: sun-spots-request@rice.edu Organization: Sun-Spots Lines: 25 Approved: Sun-Spots@rice.edu Originator: spots@titan.rice.edu X-Sun-Spots-Digest: Volume 9, Issue 322, message 2 I've been having a problem using the "date -a" command under SunOS4.1. More specifically, issuing a "date -a +20" does drift the clock 20 seconds, but then it drifts back again to the original time. This problem also seems to effect the operation of ntp (network time protocol). I even attempted to write a little C program to exercise the adjtime system call (code below). Well, the same thing happens. As a side note, using date without the -a option (to explicitly set the time) works as it should. Clearly, this points to the implementation of adjtime() in the kernel. >> #include >> >> main () >> { >> struct timeval foo; >> >> foo.tv_sec=20; >> adjtime (&foo, (char *) 0); >> } Has anyone else experienced this problem? Is there a known fix? Terry Domae Northrop Research and Technology Center