You are not logged in.

#1 2012-08-09 17:12:36

Jindur
Member
Registered: 2011-09-29
Posts: 184

[SOLVED] Clock wrong both ways, --utc or --localtime

If I set

hwclock --utc

I'm one hour ahead of my real time, if I set

hwclock --localtime

I'm one hour behind.
The correct time zone is set in rc.conf.
I have to do

sudo date -s <correct time>

everytime I reboot.

Last edited by Jindur (2012-08-09 17:35:03)

Offline

#2 2012-08-09 17:19:13

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

how about this?

ntpdate pool.ntp.org && hwclock --utc --systohc

Offline

#3 2012-08-09 17:20:08

sillerd
Member
Registered: 2011-11-27
Posts: 19

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

I have a problem with installing arch on my netbook it has worked in the past but now i wanna reinstall but every time i try to boot of the live install the bios lists "removable device" and doesn't boot off it and I'm thinking that its the cpu cause it has a 32-bit cpu and the installer might now be only 64-bit? any suggestions?

Offline

#4 2012-08-09 17:20:49

sillerd
Member
Registered: 2011-11-27
Posts: 19

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

wrong place to post this >_>

Offline

#5 2012-08-09 17:20:52

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

jindur, Is this a new install? Did you set the timezone by linking /etc/localtime to the appropriate timezone?

https://wiki.archlinux.org/index.php/Be … e#Timezone

https://wiki.archlinux.org/index.php/Be … clock_time

Last edited by 2ManyDogs (2012-08-09 17:21:32)

Offline

#6 2012-08-09 17:25:34

Jindur
Member
Registered: 2011-09-29
Posts: 184

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

Well it's the only Arch install I ever made, it's about 1.5 years old and I never touched /etc/localtime iirc. But I just checked it and it's linked correctly.

"ntpdate" not found and not in pacman either. And I want to understand what's wrong here.

I just changed my BIOS clock to UTC time, and in Arch type

hwclock --utc

and that command replies with the correct time! But if I type

date

afterwards or look at the X clock they both give the wrong time again (2 hours earlier). They also do this if I try

hwclock --localtime

so it seems the hwclock command has actually no effect at all.

Last edited by Jindur (2012-08-09 17:28:24)

Offline

#7 2012-08-09 17:32:15

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

Do you have an /etc/adjtime file? If you do, what is in it?

And what is in rc.conf (you said it's the correct time zone; is it on the HARDWARECLOCK line?)

Last edited by 2ManyDogs (2012-08-09 17:34:59)

Offline

#8 2012-08-09 17:34:17

Jindur
Member
Registered: 2011-09-29
Posts: 184

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

Yes, /etc/adjtime contains

0.000000 0 0.000000
0
UTC

And I actually just fixed the problem I think, by editing /etc/rc.conf and setting

HARDWARECLOCK="UTC"

and doing

hwclock --utc -s

and rebooting. Now finally the system shows the correct time from

date

or in X!

Offline

#9 2012-08-09 17:36:02

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Clock wrong both ways, --utc or --localtime

Great! Mark the thread [solved] please (edit the title of your first post).

(edit) you're quick...

Last edited by 2ManyDogs (2012-08-09 17:36:59)

Offline

Board footer

Powered by FluxBB