Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!isi.edu!gremlin!nrtc.northrop.com!domae From: domae@nrtc.northrop.com Newsgroups: comp.protocols.time.ntp Subject: "date -a" bug? under SunOS4.1 Keywords: date, adjtime Message-ID: <10757@gremlin.nrtc.northrop.com> Date: 9 Oct 90 13:12:09 GMT Sender: news@gremlin.nrtc.northrop.com Reply-To: domae@nrtc.northrop.com Distribution: usa Organization: Northrop Research & Technology Center, Palos Verdes, CA Lines: 27 ## Note - This is a re-post from comp.sys.sun 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