You are not logged in.

#1 2009-09-26 01:31:52

knopper92
Member
From: British Columbia, Canada
Registered: 2009-05-14
Posts: 40

[solved]Time issues

I had no idea which category to put this in so please move it if neccessary.

I'm running Arch 64-bit and having a problem with my clock resetting on every boot. Everytime I try setting the clock back to a correct time, on the next reboot fsck overwrites it saying "last superblock mount time is in the future: FIXED" or some crap like that.

I checked to see if I have the right timezone selected (America/Vancouver which is PST - 7 I think) and it appears to be correct, but the time is still seven hours behind on every boot.

Why is it so hard to get something as simple as a clock to work properly? This is REALLY frustrating me.

Last edited by knopper92 (2009-09-26 03:50:51)

Offline

#2 2009-09-26 06:37:00

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: [solved]Time issues

- Are you using localtime or UTC (/etc/rc.conf: HARDWARECLOCK="localtime" is for localtime)?
- Is your BIOS set to the correct time?
- Do you dual boot with Windows? If yes, Windows uses localtime, so if Arch uses UTC, Windows resets that.

I've found two posts, which seem to deal with the same problem:

http://bbs.archlinux.org/viewtopic.php?id=79543
http://bbs.archlinux.org/viewtopic.php?id=80895

Offline

#3 2009-09-26 11:20:02

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [solved]Time issues

Did you try to set the hardware clock to system time (as root)?

hwclock --systohc

Also man hwclock is worth reading anyway. wink

Last edited by bernarcher (2009-09-26 11:20:41)


To know or not to know ...
... the questions remain forever.

Offline

#4 2009-09-29 01:29:53

oujheush
Member
Registered: 2009-09-29
Posts: 1

Re: [solved]Time issues

bernarcher wrote:

Did you try to set the hardware clock to system time (as root)?

I actually double checked that it was correct from BIOS directly. So I don't think resyncing the hwclock is going to fix it, whether I do it from inside the Arch system or not.

I've got the same problem as OP to the best of my understanding: booting into a 64bit Arch GNU/Linux installation and getting a system time being set incorrectly, although hardware clock appears to be correctly set to localtime and rc.conf is right.

My rc.conf has hardware clock set to "localtime", was "local" orginally but the documentation seems to suggest the other is correct. No change observed after rebooting after changing the setting. Timezone is set correctly below in rc.conf, matches the given timezone in /etc/localtime and /usr/share/timezone/America/Chicago.

So, any other ideas? Also, this is a recent change. I did a bunch of system updates recently, first time iirc since I installed from a LiveCD. Previously the time was correctly functioning.

Offline

#5 2009-09-29 02:20:26

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: [solved]Time issues

Set the hardware clock to the correct time and then delete the file /var/lib/hwclock/adjtime
This solution came up here on the forum a few times. I did it and it fixed my problem. Don't worry about the file, it will be recreated automatically.

Last edited by SoleSoul (2009-09-29 02:22:01)

Offline

#6 2009-10-11 12:46:36

octesian
Member
Registered: 2009-10-11
Posts: 13

Re: [solved]Time issues

I have the same problem.  I dual boot with Ubuntu and no matter how many times I delete /var/lib/hwclock/adjtime it regenerates and adds 7 hours to my time.  My bios time remains correct throughout all this.  The only way I'm able to boot into arch is to boot into Ubuntu, set the time correctly there and delete /var/lib/hwclock/adjtime ot by Arch partition.  When I boot into arch the time has changed again back to forward 7 actual time.  in /etc/rc.conf HARDWARECLOCK="localtime".


Interesting.  When I remove the /var/lib/hwclock/adjtime while in gnome, my clock goes forward 7 hours again.  Is there a way I can bypass that file all together and get the time only from the bios?

Oh, and this happened after updating to the 2.6.31 kernel.

Last edited by octesian (2009-10-11 13:09:12)

Offline

#7 2009-10-11 14:02:31

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [solved]Time issues

Really hard to tell.

To get nearer about what might happen you should find out which time the hardware clock keeps. Try both in Ubuntu and (most immediately) afterwards in Arch (after you set the clock in Ubuntu):

$ hwclock --show
Sun Oct 11 15:52:08 2009  -0.390894 seconds

This gives you the time and the current shift the hardware clock keeps. Time should be equal (considering the lap caused by the system switch) and the shift should be nearly alike.

If there are great differences check whether Ubuntu and Arch use the same local time settings. Also try to set the system time right in your Arch (as root), using date and then synchronize the hardware clock to it:

# hwclock --systohc

Also you might check whether your time zone settings are equal.

And last but not least, have a look at man date, and man hwclock. wink


To know or not to know ...
... the questions remain forever.

Offline

#8 2009-10-11 16:19:12

AngryKoala
Member
Registered: 2009-01-22
Posts: 197

Re: [solved]Time issues

octesian wrote:

Interesting.  When I remove the /var/lib/hwclock/adjtime while in gnome, my clock goes forward 7 hours again.  Is there a way I can bypass that file all together and get the time only from the bios?

Oh, and this happened after updating to the 2.6.31 kernel.

When I use the date command to set the date and time, it not only sets it in my OS it sets it in my bios.  Have you tried that?

Offline

#9 2009-10-11 18:52:16

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [solved]Time issues

AngryKoala wrote:

When I use the date command to set the date and time, it not only sets it in my OS it sets it in my bios.  Have you tried that?

Does it? I never even thought of that effect. Always thought it was system software, recorded somewhere on disk. But on second thought, citing from info coreutils 'Setting the time':

...`date' sets the system clock to the date and time specified...

"System clock" could well be the BIOS one. Could rise interesting side effects. Hmm...

Last edited by bernarcher (2009-10-11 18:52:49)


To know or not to know ...
... the questions remain forever.

Offline

#10 2009-10-11 23:33:59

octesian
Member
Registered: 2009-10-11
Posts: 13

Re: [solved]Time issues

Heres the output from hwclock --show it ubuntu;
Sun 11 Oct 2009 04:21:31 PM MST  -0.805035 seconds
Arch was about;
Sun 11 Oct 2009 11:20:31 PM MST  -0.605035 seconds

I didn't touch change the time in arch because I wanted to see if ubuntu's time would change itself as well (it didn't).  Times zones are the same between distros and my BIOS time stays the same.

Edit: I changed the time in Arch to the correct time and it sets my Ubuntu time back 7 hours as well, however my BIOS time still reads as the correct time.

Last edited by octesian (2009-10-12 00:30:12)

Offline

#11 2009-10-12 01:00:34

octesian
Member
Registered: 2009-10-11
Posts: 13

Re: [solved]Time issues

Okay, I fixed it.  I changed a line in (Ubuntu) /etc/default/rcS from UTC:yes to UTC:no, rebooted into Arch (got stopped to remount my boot partition with the correct time) and all my clocks are the same. Thank you all for your help.

Offline

Board footer

Powered by FluxBB