jerry@polygen.uucp (Jerry Sheckel) (11/20/90)
Hello. I'm running SCO Sys V/386 3.2.1 (ODT 1.0). What the hell is wrong with the 'date' command? It actually seems to overwrite the CMOS clock! I got sick of having to enter the correct time upon bootup, so I deleted a few lines from /etc/asktimerc, so that all it does is essentially a "date `setclock`". This works roughly half the time. The other half of the time, the date ends up being a few hours off (not minutes, always hours). The weird thing is that entering "date `setclock`" from the command line actually advances the CMOS clock by 5 hours, every time. Anyone out there have problems like these? Any solutions? -- +-------------------+----------------------+---------------------------------+ | JERRY J. SHEKHEL | POLYGEN CORPORATION | When I was young, I had to walk | | Drummers do it... | Waltham, MA USA | to school and back every day -- | | ... In rhythm! | (617) 890-2175 | 20 miles, uphill both ways. | +-------------------+----------------------+---------------------------------+ | ...! [ princeton mit-eddie bu sunne ] !polygen!jerry | | jerry@polygen.com | +----------------------------------------------------------------------------+
rags@hpcuhc.cup.hp.com (Balakrishna Raghunath) (11/22/90)
You are right.... I have seen this problem and reported this bug to SCO. God knows when they will fix this. A safe way to set the time is to use the script asktime (which directly writes to the cmos clock driver). apparently date uses the stime() system call which may be broken.. rags
cpcahil@virtech.uucp (Conor P. Cahill) (11/22/90)
In article <893@stewart.UUCP> jerry@stewart.UUCP (Jerry Shekhel) writes: >The weird thing is that entering "date `setclock`" from the command line >actually advances the CMOS clock by 5 hours, every time. Anyone out there >have problems like these? Any solutions? Sounds like a timezone problem (especially since you are in the EST5EDT timezone which is 5 hours behind GMT. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170
walter@mecky.UUCP (Walter Mecky) (11/22/90)
In article <893@stewart.UUCP> jerry@stewart.UUCP (Jerry Shekhel) writes:
< Hello. I'm running SCO Sys V/386 3.2.1 (ODT 1.0). What the hell is wrong
< with the 'date' command? It actually seems to overwrite the CMOS clock!
Yes it does. Suppose it's another nasty bug, because for setting the CMOS
clock there is "setclock".
< I got sick of having to enter the correct time upon bootup, so I deleted
< a few lines from /etc/asktimerc, so that all it does is essentially a
< "date `setclock`". This works roughly half the time. The other half of
< the time, the date ends up being a few hours off (not minutes, always hours).
< The weird thing is that entering "date `setclock`" from the command line
< actually advances the CMOS clock by 5 hours, every time. Anyone out there
< have problems like these? Any solutions?
I made the same experiences. The reasons are, that "date" takes your
timezone (according to TZ in the environment) and "setclock" does not.
I solved the problem in temporary unsetting TZ:
TZ= date `setclock`
Hope that helps.
--
Walter Mecky [ walter@mecky.uucp or ...uunet!unido!mecky!walter ]