You are not logged in.

#1 2010-01-15 02:51:58

hiker
Member
Registered: 2009-08-06
Posts: 18

How to set correct time

My time stardard set to HARDWARECLOCK="UTC" and TIMEZONE="Asia/Shanghai"  in /etc/rc.conf,and code:hwclock --set --date;date;hwclock --systohc/--hctosys,etc. but  can not get the correct time when restart mechine second day.

Output of my mechine:
$date
Thu Jan 14 12:17:22 CST 2010
$hwclock --show
Thu 14 Jan 2010 12:19:12 PM CST  -0.588858 seconds

How can I get correct time?Thanks a lot.


Yeah.Keep It Simple and Stupid!

Offline

#2 2010-01-15 03:03:14

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: How to set correct time

You should set the local time in BIOS.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2010-01-15 03:21:30

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: How to set correct time

HARDWARECLOCK="localtime"


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#4 2010-01-15 03:40:36

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: How to set correct time

Or keep it at ="" and use openntpd to set the time


neutral

Offline

#5 2010-01-15 05:15:13

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

Re: How to set correct time

+ 1 to openntpd. it keeps syncing with a time server. so you dont have to worry about it ever. Comes in extremely handy on older machines like mine where the clock starts lagging. wink

Last edited by Inxsible (2010-01-15 05:15:28)


Forum Rules

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

Offline

#6 2010-01-15 15:22:46

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: How to set correct time

Another +1 for openntpd.
I use it on my home server and on all the other PCs that use Linux. The openntpd on my server syncs to a pool of servers located in my country. And it also presents itself as a NTP server on the LAN here, all the other boxes in the home (Windows and Linux alike) sync to it in turn.

Works flawlessly. smile

Offline

#7 2010-01-15 15:35:07

lustikus
Member
Registered: 2009-11-10
Posts: 262

Re: How to set correct time

you can also use ntp.
get it with

pacman -S ntp

then sync your time:

ntpdate ntp3.sf-bay.org

Offline

#8 2010-01-15 15:41:54

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: How to set correct time

I also recommend OpenNTPD. It will use the internet to set the time on your computer. More information here: http://wiki.archlinux.org/index.php/Net … e_Protocol If you can read Chinese: http://wiki.archlinux.org/index.php/Net … 6%96%87%29

Offline

#9 2010-01-15 17:14:32

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: How to set correct time

Use this:http://wiki.archlinux.org/index.php/Net … e_Protocol

Last edited by n0dix (2010-01-15 17:15:36)

Offline

#10 2010-01-15 17:47:00

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: How to set correct time

ntp or OpenNTPD FTW. (I'm using ntp)

Use which ever and never worry again about time.
It's not that hard to set and once you set it, you never need to worry again (, well only if you're reinstalling...)


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#11 2010-01-15 18:30:40

lustikus
Member
Registered: 2009-11-10
Posts: 262

Re: How to set correct time

Primoz wrote:

It's not that hard to set and once you set it, you never need to worry again (, well only if you're reinstalling...)

or when booting windows on your other partition. somehow windows changes my time when I boot it. I read about this problem somewhere but forgot the elegant fix for this (I don't really care since I rarely boot windows) so I use ntp to set my time again.

Offline

#12 2010-01-15 19:11:09

apollokk
Member
From: Please delete me!
Registered: 2009-03-23
Posts: 157
Website

Re: How to set correct time

OpenNTPD by me, too.


/me wants you to detele this account... please delete it.

Offline

#13 2010-02-10 03:44:53

hiker
Member
Registered: 2009-08-06
Posts: 18

Re: How to set correct time

lustikus wrote:

you can also use ntp.
get it with

pacman -S ntp

then sync your time:

ntpdate ntp3.sf-bay.org

Thanks lustikus,It is easy to set and work!


Yeah.Keep It Simple and Stupid!

Offline

#14 2010-02-10 17:36:08

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: How to set correct time

if you have windows 7 (possibly with vista too) you can change some ridiculous hidden registry key to make it leave the time on UTC (usually it loads it as localtime, turns it into UTC, then offsets, then saves as localtime again...). I just let Windows run 5 hours ahead of the real time because I hardly use it tongue.

Offline

#15 2010-02-10 17:47:48

sHyLoCk
Member
From: /dev/null
Registered: 2009-06-19
Posts: 1,197

Re: How to set correct time

sHyLoCk wrote:

HARDWARECLOCK="localtime"

Switched to openntpd as well. smile


~ Regards,
sHy
ArchBang: Yet another Distro for Allan to break.
Blog | GIT | Forum (。◕‿◕。)

Offline

#16 2010-02-21 03:09:24

hiker
Member
Registered: 2009-08-06
Posts: 18

Re: How to set correct time

"ntpdate ntp3.sf-bay.org" work OK,but I find that the correct time setuped can not be keeped,tomorrow remain a incorrect time.How fix it.Thanks


Yeah.Keep It Simple and Stupid!

Offline

Board footer

Powered by FluxBB