You are not logged in.

#1 2007-10-27 01:49:35

drmagic
Member
From: Wuhan@China
Registered: 2007-10-27
Posts: 6

How to set the OS's date time?

I'm in arch with the gnome as my desktop environment,but I could not find the way to adjust my system's date time. And when I use 'pacman -S gnome-system-tools' ,there's no that pkg.
Could anybody help me ? Thanks all

Offline

#2 2007-10-27 01:52:27

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: How to set the OS's date time?

Use the 'date' command. Check 'date --help' for options.


Welcome to Arch.

Last edited by skottish (2007-10-27 01:52:39)

Offline

#3 2007-10-27 01:54:50

drmagic
Member
From: Wuhan@China
Registered: 2007-10-27
Posts: 6

Re: How to set the OS's date time?

Thanks a lot!
Arch is the most perfect dist I have ever met.

Offline

#4 2007-10-27 04:38:58

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: How to set the OS's date time?

Or, adjust the date in BIOS, and then select timezone, and type in rc.conf

HARDWARECLOCK="localtime"
TIMEZONE="Canada/Pacific"

"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#5 2009-01-06 22:56:02

absolutezero1287
Member
Registered: 2008-11-13
Posts: 133

Re: How to set the OS's date time?

I used the date command to change the time but it wasn't permanent.
That's part of my rc.conf

HARDWARECLOCK="localtime"
TIMEZONE="US/Eastern"

Any help?

Offline

#6 2009-01-06 23:06:42

sirius
Member
From: Norway
Registered: 2008-12-25
Posts: 68

Re: How to set the OS's date time?

Use 'hwclock --systohc' as root to set hardware time to system time :-)

Offline

#7 2009-01-06 23:54:23

absolutezero1287
Member
Registered: 2008-11-13
Posts: 133

Re: How to set the OS's date time?

Sirius, good advice but the time is totally wrong, lol.

Offline

#8 2009-01-07 00:03:03

absolutezero1287
Member
Registered: 2008-11-13
Posts: 133

Re: How to set the OS's date time?

root@satori~# hwclock --set --date="01/06/2009 19:00:00"
root@satori~# hwclock --hctosys

Fixed my problem. smile
@sirius I basically did what you told me, but the opposite way. Thanks :-)

Edit: I just realized...why would anyone need a GUI to do this? Just read the man page and I got it.

Last edited by absolutezero1287 (2009-01-07 00:04:38)

Offline

#9 2009-01-07 17:22:31

whukes
Member
Registered: 2008-07-18
Posts: 34

Re: How to set the OS's date time?

You could also use openntpd to sync the time automagically.

Make sure your rc.conf timezone is setup correctly then install openntpd:

pacman -S openntpd

Then from a terminal run the command (as root):

ntpd -sd

That should sync your time.  To do this automatically at boot just add openntpd to your daemons line in rc.conf.  Read http://wiki.archlinux.org/index.php/Ntpd for more info.

Offline

#10 2009-01-08 05:14:23

absolutezero1287
Member
Registered: 2008-11-13
Posts: 133

Re: How to set the OS's date time?

Thank you. What I was confused was about all the configurations that had to be made but as I read on I saw that that was only if you wanted to run a server.

Offline

Board footer

Powered by FluxBB