Hi, I am having a problem setting the date/time on my Linux box. I set it using date 030310152001 for 3/3/2001 10:15. Everyting seems fine until I reboot the box. At that time it changes to some other time. I checked my CMOS and the time is correct. What am I doing wrong? thanx for your help. Peter N.
Peter, Using date to set the date doesn't automatically modify the cmos clock. Try running hwclock --systohc after running date to set the hardware clock. Read the hwclock manpage for more information. --Michael Gorse, WPI CS '01 / ICQ:22583968 / http://www.wpi.edu/~mgorse/ --
Oops; discard my previous message; I was not thinking at all or reading carefully... Could your time zone be set incorrectly? Make sure /etc/localtime is linked to the correct file (/usr/share/zoneinfo/US/Eastern, for instance), and be sure that your os isn't configured to use gmt when you don't have your clock set to gmt or vice versa. --Michael Gorse, WPI CS '01 / ICQ:22583968 / http://www.wpi.edu/~mgorse/ --
From: "Peter Nikolla" <petern@hvnnet.com>
Hi,
I am having a problem setting the date/time on my Linux box.
I set it using date 030310152001 for 3/3/2001 10:15. Everyting seems fine until I reboot the box. At that time it changes to some other time. I checked my CMOS and the time is correct. What am I doing wrong?
Check /etc/adjtime and if it has big numbers in it, delete it. Read "man hwclock" to understand why. -- -- Keith Wright <kwright@free-comp-shop.com> Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com> --- Food, Shelter, Source code. ---
On Sat, 3 Mar 2001, Keith Wright wrote:
Date: Sat, 3 Mar 2001 20:50:27 -0500 From: Keith Wright <kwright@gis.net> Reply-To: wlug@mail.wlug.org To: wlug@mail.wlug.org Subject: Re: [Wlug] Set Date/Time
From: "Peter Nikolla" <petern@hvnnet.com>
Hi,
I am having a problem setting the date/time on my Linux box.
I set it using date 030310152001 for 3/3/2001 10:15. Everyting seems fine until I reboot the box. At that time it changes to some other time. I checked my CMOS and the time is correct. What am I doing wrong?
Check /etc/adjtime and if it has big numbers in it, delete it. Read "man hwclock" to understand why.
-- -- Keith Wright <kwright@free-comp-shop.com>
Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com> --- Food, Shelter, Source code. --- _______________________________________________ <snip>
I'm not sure that's the right approach. The adjtime file needs a rational setting, which it gets by noting the drift in hwclock time v. "real" time, which assumes that the real (system) time is accurate (nntp service?). This may help... 1. Get you system time set correctly. 2. run hwclock --systohc --utc (you determine if the --utc is right for you. 3. Wait a day or 2 while you system is still up. Don't reboot. 4. Check you system time & make sure it's right. 5. Do step #2 again. Any hwclock time drift will be reflected in the adjtime file. Bill
From: "Peter Nikolla" <petern@hvnnet.com>
I am having a problem setting the date/time on my Linux box.
If you are not dual booting, set the proper time in UCT (Greenwich) in the ROM bios. Once that is right, it will become clear what is wrong. If you are dual booting, you may be forced to set the hardware clock to local civil time. That is no disaster, but you have to think harder to get it right. I think 'hwclock' should only be used to make small adjustments if the clock drifts after being set correctly. I am not sure what 'date' is for in SET! mode (as opposed to DISPLAY mode). Maybe in case you need to back-date some documents without re-booting.
I set it using date 030310152001 for 3/3/2001 10:15.
I almost wrote back "thou fool, hast permuted fields", but the 'man date' page seems to agree with you. Can anybody think of a more obtuse way to write a date? Sometimes Unix is embarrasing.
until I reboot the box. At that time it changes to some other time.
Calculate the amount of change and meditate upon that number.
I checked my CMOS and the time is correct. What am I doing wrong?
Correct local or correct UCT? -- -- Keith Wright <kwright@free-comp-shop.com> Programmer in Chief, Free Computer Shop <http://www.free-comp-shop.com> --- Food, Shelter, Source code. ---
participants (4)
-
Bill Mills-Curran
-
Keith Wright
-
Mike Gorse
-
Peter Nikolla