From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e6d38aeec2b890fc X-Google-Attributes: gid111c93,public From: Jay A Estabrook Subject: Re: Clock starts up with wrong date. Date: 1998/10/30 Message-ID: <363A876F.167E@digital.com>#1/1 X-Deja-AN: 406894575 Content-Transfer-Encoding: 7bit References: <35D36FB5.47555D3D@cig.mot.com> <6ur9nt$6j2$1@news.onramp.net> <6uraqf$amm$1@vixen.cso.uiuc.edu> <70i6he$m51@linde.she.de> <70iang$98h$1@cabrera.haiti.cs.uni-potsdam.de> <711ln7$u@linde.she.de> X-Ultra-Time: 31 Oct 1998 03:41:35 GMT Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@ultra.net Organization: Compaq Computer Corp - Alpha Engineering Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha naegele@ShE.DE wrote: > > If I fix the date > in the ARC console to the correct year 1998 and boot up linux, > then the system time und CMOS time is set to 2018 and also > only the year is wrong, month day, time is ok. NOTE: the below is true for *ALL* Linux/Alpha platforms. --------------------------------------------------------- ARC console and SRM console keep dates in the time-of-year (TOY) clock in slightly different formats (actually, only the "year" field differs). The "/sbin/clock" binary normally expects the format which SRM uses; you can, however, tell it to expect ARC format instead, using the "-A" flag. Thus, to read the clock when its kept in ARC format, say "clock -r -A", and to write it, "clock -w -A". If its not written in the expected format, the console (ARC or SRM) will prolly complain about it the next time it has a chance... :-\ The best way to ensure you're using the correct format, is to set the date via the console's date-setting facility; under ARC, it's a menu item some place, under SRM it's a command (IIRC; try "help date"). Then you must ensure that the "clock" call in the RH script /etc/rc.d/rc.sysconfig KNOWS WHAT FORMAT TO READ THE TOY IN!!!! If you're using ARC console to boot MILO/kernel, do: 1. running RH 4.1, make sure /etc/sysconfig/clock contains: CLOCKMODE="ARC" 2. running RH 4.2, or later, make sure /etc/sysconfig/clock contains (at least): ARC=true Now, If you're using SRM console to directly boot a kernel, then: 1. RH 4.1, same file, set CLOCKMODE="" 2. RH 4.2, or later, same file, set ARC=false Refer to /etc/rc.d/rc.sysconfig for details about how the above are used to call "clock" with the appropriate arguments. --Jay++