You are not logged in.

#1 2011-05-02 21:03:33

MickST
Member
Registered: 2010-02-26
Posts: 54

Setting HWCLOCK to localtime or utc.

Hi, in the new initscripts update announcement there's the following sentence:

"We now strongly discourage the use of HWCLOCK="localtime", as this may lead to several known and unfixable bugs. However, there are no plans to drop support for "localtime"."

I'm dual booting my machine with a Windows OS, so I've always had it set to localtime; otherwise Windows would display the time incorrectly. What are the known and unfixable bugs when set to "localtime"? Is it anyway I could put it UTC and keep Windows working as usual? What do you (dual booting users) do?

Thanks.

Offline

#2 2011-05-02 21:31:06

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

Re: Setting HWCLOCK to localtime or utc.

you can set your windows machine to use UTC too.

http://kb.norsetech.net/set-windows-clock-to-utc-time/

Offline

#3 2011-05-02 23:06:07

twilight0
Member
From: Greece
Registered: 2011-05-01
Posts: 227
Website

Re: Setting HWCLOCK to localtime or utc.

Thanks JokerBoy, I wasnt aware of that trick.


Proud Arch Linux user since 2007.

Offline

#4 2011-05-03 01:00:28

MickST
Member
Registered: 2010-02-26
Posts: 54

Re: Setting HWCLOCK to localtime or utc.

Thank you for the tip! I didn't know that either.

I've tried it and seems to be working fine, so no need for localtime then I guess.

Offline

#5 2011-05-03 01:07:14

x33a
Forum Moderator
Registered: 2009-08-15
Posts: 3,392
Website

Re: Setting HWCLOCK to localtime or utc.

For the problems caused by use of localtime, take a look here:

https://wiki.archlinux.org/index.php/Sy … caltime.3F

There was a detailed discussion at arch-general mailing list about this, those interested can take a look here:

http://mailman.archlinux.org/pipermail/ … 19750.html

Offline

#6 2011-05-05 16:33:52

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

Re: Setting HWCLOCK to localtime or utc.

I wouldn't have a problem setting my hwclock to utc if it wasn't for the fact that my laptop has an external lcd clock that displays the hwclock time.... which i would prefer to use, and in localtime

/offtopic, but if you have a long uptime, its interesting to watch the clocks drift apart...


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

#7 2011-06-07 09:05:52

Doctor Drive
Member
From: Ukraine
Registered: 2010-08-11
Posts: 167
Website

Re: Setting HWCLOCK to localtime or utc.

[removed]

Last edited by Doctor Drive (2011-06-07 09:33:57)

Offline

#8 2011-06-07 14:02:50

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: Setting HWCLOCK to localtime or utc.

I have a company laptop where the time is set automatically whenever it connects to the domain. (windows)
The IT staff is rather large with me doing stuff on my own, but I didn't want to change anything in the main system.

The solution for me was to change /etc/rc.conf and set

HARDWARECLOCK="virtual"

(I guess any value other than "localtime" and "utc" would do the trick)

Then I added the following to /etc/rc.local

hwclock -s --localtime

That way my Linux system never changes the hardware clock. It only reads it on every boot.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#9 2012-08-22 01:51:30

bkadoctaj
Member
Registered: 2010-05-02
Posts: 52

Re: Setting HWCLOCK to localtime or utc.

@madeye That is a fantastic solution for those who use Windows most of the time (especially Windows XP or Vista, but also 7) and Arch only some of the time.  Thanks.

Note: Even with the change in /etc/rc.conf recently, the HARDWARECLOCK= line still works.

Offline

Board footer

Powered by FluxBB