You are not logged in.

#1 2011-05-04 22:45:18

sudokill
Member
Registered: 2011-04-27
Posts: 54

Clock wrong

My clock in gnome and when I run "date" used to be an hour ahead when using UTC in rc.conf. I changed it to "localtime" and the time was always right, up until I read that "localtime" is discouraged in rc.conf, so I've set it back to UTC to avoid any problems. But my time is always an hour fast with UTC.

If I change the time through gnome date and time settings, it displays the right time on the clock and with the "date" command, but it goes back to an hour ahead after a reboot. The clock in my BIOS shows the correct time if that matters. Do I need some NTP daemon thing running to keep it in sync?

Offline

#2 2011-05-04 23:02:28

TeoBigusDickus
Member
From: /Greece/Kastoria
Registered: 2010-05-29
Posts: 141

Re: Clock wrong

Is your time zone set correctly in rc.conf?


Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!

Offline

#3 2011-05-04 23:10:06

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

Yes, europe/london.

I dual boot with XP for my games, but haven't actualled booted into XP since I changed the settings to UTC in rc.conf so surely that can't matter. I will change XP to utc with the reg key setting anyway, but I can't seem to see why the time's an hour ahead in Arch. Is i something to do with my BIOS clock? I have no options in my BIOS for the clock (UTC localtime etc) other than to literally set the time.

Offline

#4 2011-05-04 23:17:27

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Clock wrong

In accordance with http://www.archlinux.org/news/initscripts-update-1/ I have tried to switch from localtime to UTC. And have got very strange timing also :-) 'date' can show past time, say, -10, or -40, or -80 minutes against current time. Everytime I have tried to correct date with

sudo ntpdate 2.ru.pool.ntp.org
sudo hwclock -w

But after next reboot I again see strange date/time. So I have reverted config to localtime. Again all does work perfectly as always.


"I exist" is the best myth I know..

Offline

#5 2011-05-04 23:20:35

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

localtime works for me too, but why does it say in the initscripts update that localtime is stronlgy discouraged and that it can lead to bugs / programs not working? That obviously puts me off using it

Offline

#6 2011-05-04 23:22:14

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Clock wrong

@sudokill

I'd also be happy if developers will find a second to teach us in this fragile topic :-)


"I exist" is the best myth I know..

Offline

#7 2011-05-04 23:26:17

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

smile well I hope we can find an answer soon

Offline

#8 2011-05-04 23:26:49

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Clock wrong

Did you try deleting /var/lib/hwclock/adjtime as described in the wiki? https://wiki.archlinux.org/index.php/Hwclock#Time_Skew

Offline

#9 2011-05-04 23:32:57

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

I deleted it, set the time in gnome to the proper time, rebooted and it's still an hour ahead again sad

Offline

#10 2011-05-04 23:35:14

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Clock wrong

Do you have hwclock in your DAEMONS array in /etc/rc.conf?

Offline

#11 2011-05-04 23:37:44

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Clock wrong

skunktrader wrote:

Did you try deleting /var/lib/hwclock/adjtime as described in the wiki? https://wiki.archlinux.org/index.php/Hwclock#Time_Skew

I have set hardware time correctly (in BIOS), and am using single boot Arch.
The most interesting question is about those "several known and unfixable bugs".


"I exist" is the best myth I know..

Offline

#12 2011-05-04 23:37:54

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

No, it says this in the initscripts update news-

"The adjustment of the hwclock for drift is moved into a daemon that should not be used in most scenarios as it can lead to subtle bugs (especially if using dual-boot or ntp)"

Should I enable it? I don't want bugs lol

Offline

#13 2011-05-04 23:47:35

student975
Member
From: Russian Federation
Registered: 2011-03-05
Posts: 613

Re: Clock wrong

skunktrader wrote:

Do you have hwclock in your DAEMONS array in /etc/rc.conf?

Have tried with and without. OTOH, probably I didn't follow valid sequence of steps to switch from localtime to UTC as far as I don't know the sequence. Say,

- set UTC and add hwclock daemon to rc.conf,
- reboot (whith checking UTC in BIOS),
- remove /var/lib/hwclock/adjtime,
- sudo ntpdate xyz.pool.ntp.org,
- be happy

Would it be correct?

Last edited by student975 (2011-05-05 13:27:00)


"I exist" is the best myth I know..

Offline

#14 2011-05-05 00:35:00

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

I seem to have sorted it.

I went into the gnome time & date settings, changed the time to the proper time and then clicked network time = on. Rebooted twice and it's stayed the right time smile (although network time in gnome reverts back to off) now when I run "date" it shows the right time.

Offline

#15 2011-05-05 07:32:12

Natanji
Member
Registered: 2009-09-22
Posts: 133

Re: Clock wrong

I need to come in with some criticism here. The completely unspecific information about why locatime should not be used seems like total FUD to me. I would really appreciate it if Arch developers could give a little more insight into this topic, since I've searched all over the wiki and forums and wasn't able to find any reason whatsoever why localtime is "bad" and which bugs originate from it.

Additionally, the information on using hwclock is ery unspecific at best. Nobody has got any idea if and why they should use hwclock, I'm guessing. What does that daemon do? man hwclock sadly doesn't display this either. From what I read here (and rom seeing that in the updated rc.conf, hwclock is in the DAEMONS array by default), hwclock should actually be enabled by default, which is not reflected in the news *at all*. This is really just confusing, please clear it up!

Last edited by Natanji (2011-05-05 07:34:18)

Offline

#16 2011-05-05 13:25:33

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Clock wrong

Natanji wrote:

Nobody has got any idea if and why they should use hwclock, I'm guessing. What does that daemon do?

The hwclock "daemon" is just a bash script.  Open it in your favorite text editor to see what it does.

Offline

#17 2011-05-05 13:58:32

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Clock wrong

You should read the wiki more carefully :

Beginner's Guide wrote:

HARDWARECLOCK
    Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores UTC time, or localtime. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.

*emphasis mine !

sudokill wrote:

I changed it to "localtime" and the time was always right, up until I read that "localtime" is discouraged in rc.conf, so I've set it back to UTC to avoid any problems.

+

sudokill wrote:

I dual boot with XP for my games

means that you fall under that category.


EDIT: Unless you have already done this : https://wiki.archlinux.org/index.php/Sy … caltime.3F


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#18 2011-05-05 16:25:51

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

I didn't boot into XP though and it still didn't work. I thought I had the clock sorted in Arch until I did boot into XP then it went back to an hour ahead. What I've done now is set XP to use UTC time (with the reg setting) and Arch to UTC as well, this works fine, across reboots etc I now have the right time, but the BIOS clock is an hour slow. Is it suppsoed to be an hour slow in the BIOS? As I am in daylight saving time (which is +1 hour)

Does the BIOS have the be without the +1 time and the OS's that use UTC just adjust accordingly? All this over a clock is confusing for me.

The way I'm thinking it works is- BIOS clock= set to normal time (without any daylight saving adjustments etc) and have OS set to UTC, so it uses BIOS clock, and adds an hour to it when it's daylight saving time. When the clocks go back, the OS using UTC will put the clock back automatically? :S :S

Last edited by sudokill (2011-05-05 16:28:13)

Offline

#19 2011-05-05 16:32:36

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Clock wrong

As far as I'm aware, UTC does not adjust for daylight savings.  UTC != GMT

Edit: Actually UTC == GMT   but GMT != BST

Last edited by skunktrader (2011-05-05 16:35:23)

Offline

#20 2011-05-05 16:36:15

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

Ok, I guess I'll have to wait until the clocks change again to see. Xp and Arch are showing the correct time with the BIOS clock set an hour behind, so I'm happy, and if the clocks don't change back, I'll just change the BIOS clock again. Having the BIOS clock set an hour behind won't cause any problems will it?

Offline

#21 2011-05-06 19:38:33

1LordAnubis
Member
Registered: 2008-10-10
Posts: 253
Website

Re: Clock wrong

Inxsible wrote:

You should read the wiki more carefully :

Beginner's Guide wrote:

HARDWARECLOCK
    Specifies whether the hardware clock, which is synchronized on boot and on shutdown, stores UTC time, or localtime. UTC makes sense because it greatly simplifies changing timezones and daylight savings time. localtime is necessary if you dual boot with an operating system such as Windows, that only stores localtime to the hardware clock.

Well, for me localtime is necessary for my hwclock b/c I have an external lcd i use for looking at the time (for ex, if i'm playing a movie fullscreen); should i really set it to utc, or disable it in the bios b/c its discouraged?
Sorry I have to be the person with an external clock pasted to their laptop

( http://lordanubis.netau.net/files/desks … dthumb.JPG)


Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

#22 2011-05-14 03:46:01

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: Clock wrong

I'm really frustrated here. As stated by someone earlier in this topic, I changed from "localtime" to "UTC" in accordance to the news and have had the wrong time ever since. I do not dual boot with any other operating system, Arch is the only thing I have installed. In the BIOS, the hardware clock is correct. In rc.conf, I have the correct time zone (America/Detroit) and I have even tried manually setting the time in KDE as root. No matter what I do, I am always four hours behind. I have spent most of my night trying to figure this out, so I'm hoping there is a clear answer somewhere on how to fix this. I'm really put off by the fact that something as trivial as setting the time is a rite of passage. No offense to anyone, I'm just frustrated.

Note: Please do not mention openntpd, I have no interest in using it. This laptop is not always connected to the Internet, and openntpd does work when I run it manually, but *every* time I turn the computer on, the time is four hours behind. I tried deleting the adjtime file as well, it doesn't fix it either. sad

Offline

#23 2011-05-14 13:06:44

sudokill
Member
Registered: 2011-04-27
Posts: 54

Re: Clock wrong

Well I had to set my BIOS clock to the time without daylight savings, in my case an hour behind. The time in the UK now is 2:05PM, my BIOS clock is set to 1:05PM and Arch uses UTC, which adds an hour to the BIOS time making it right when I run "date" or view the time in gnome

Last edited by sudokill (2011-05-14 13:07:11)

Offline

#24 2011-05-14 13:20:13

jlacroix
Member
Registered: 2009-08-16
Posts: 576

Re: Clock wrong

sudokill wrote:

Well I had to set my BIOS clock to the time without daylight savings, in my case an hour behind. The time in the UK now is 2:05PM, my BIOS clock is set to 1:05PM and Arch uses UTC, which adds an hour to the BIOS time making it right when I run "date" or view the time in gnome

If I run "ntpd -s -d" the time is fixed. When I reboot, it's behind by four hours again. As I said, the BIOS clock is perfect and the correct timezone was chosen. This makes no sense at all.

Offline

#25 2011-05-14 23:45:26

caseyjp1
Member
From: Denver
Registered: 2009-12-22
Posts: 35
Website

Re: Clock wrong

I'm on a dual boot with an ubuntu partition for testing that distro.  EVERYTIME I boot Ubuntu, the time/date are correct, but EVERYTIME I boot back into Arch (using alternately ntpd  OR just hardwareclock=utc) the time is off by 4 hours.   Also when booting back into arch it thinks the time is in the future and corrects when checking the drives.  Been through the forums trying to figure this out, but I'm in the same boat with this issue.  Driving me crazy.  Oh...testing with "localtime"....works perfectly.

As an fyi I DO have a win7 partition (for testing as well), but haven't booted that partition in over six months.

This issue seems to happen when ANY other distro/OS lives with arch.

Offline

Board footer

Powered by FluxBB