Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Date: Can it be specific to a shell?? Message-ID: <1138@virtech.UUCP> Date: 9 Sep 89 02:27:13 GMT References: <72074@yale-celray.yale.UUCP> Distribution: usa Organization: Virtual Technologies Inc Lines: 38 In article <72074@yale-celray.yale.UUCP>, zador-anthony@CS.YALE.EDU (anthony zador) writes: > > How does the UNIX date command know the date? It performs a time(2) system call which gets the current time in seconds (actually this is the count of seconds since Jan 1, 1970 12:00am GMT), the ctime(3) library call is then used to generate the date that we all know and love. > Is there some file that is updated? Nope. > Must date be the same to all shells on a given machine, Yup. > or can su selectively adjust the date for a given shell? Nope. > If a machine A is the disk server for B, what determines > the date-stamp for a file, A or B? Depends upon the software you are using for the server, but it probably is the time on the machine that the file is stored. RFS uses a mechanism where it determines the time difference between the two machines at the start of a connection and this difference is added/subtracted whenever time containing data about files is passed between the systems. This way the times will be consistently relative to each other and not corrupted by system clocks with largely different times. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+