Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.sys.apollo Subject: Re: Calendar sync Message-ID: <61901@sun.uucp> Date: 28 Jul 88 21:13:20 GMT References: <3268562@um.cc.umich.edu> Sender: news@sun.uucp Lines: 41 > At sr10, you can reset the node time without shutting down. If you don't > have sr10, you can't. I think you can get a daemon that synchronizes > clocks for you. If not, it would be pretty easy to write. You need > one or more central nodes, preferably with a WWV clock, running a time > of day server. There's an RFC out on this (don't know the number). Well, there are several time protocols: RFC868 describes the "Time protocol", which is a protocol that permits a client to request a server's notion of the current time, in seconds since 00:00 1 January 1900 GMT. It's a very simple protocol, and is provided both as a TCP-based and UDP-based service. This sounds like the one you're referring to. From a previous article here: "RFC958 documents the protocol; RFC957 and 956 are related RFC's." This refers to the Network Time Protocol, which the introduction to RFC958 describes as "a protocol for synchronizing a set of network clocks using a set of distributed clients and servers." The Berkeley time daemon uses its own protocol; I don't know if there's an RFC for it or not. It's described in a section of the 4.3BSD System Manager's Manual. > The timezone is a little trickier. It's stored in a completely separate > way. Unfortunately, I think you still need to shut down to change the > timezone, even at sr10. This is a lot better than Unix in the old days, > which required you to recompile all your programs to change the timezone. The *VERY* old days. Ever since V7, the name and GMT offset of the current time zone, as well as an indication of whether DST was observed or not, has been fetched at run time from some source. It came from the kernel in V7, so you either had to recompile the system or have some program to patch the kernel; 4.2BSD added a system call to change this information. It came from the environment in S3 and S5. Unfortunately, neither of those permitted you to change the DST *rules*. 4.2BSD had more than the US rules in it; the kernel would tell you which rule set to use. However, you had only a few rule sets to choose from, and the rule sets were compiled in. S5R3.1 allows you to specify the *current* year's rules in an environment variable, and POSIX proposes a slight improvement over this. The best way to do it is to fetch it from a file; public-domain code to implement this has been posted to the net, and has been adopted by a number of UNIX vendors.