You are not logged in.

#1 2009-09-01 18:56:30

YamiFrankc
Member
From: Mexico
Registered: 2009-06-19
Posts: 177
Website

Cant set time

Hey.

The time Arch shows is incorrect.
My bios one is correct.

I have tried booth local time and utc in the rc.conf file. But none works.
I have also tried to delete the file /var/lib/hwclock/adjtime,it failed.

The clock actually show -5 hours of the real time.
My time zone is "America/mexico_city.

I really dont want to use something like ntpd 'caue i dont connect to internet everytime i turn on my laptop.

Any help?
Thanks

PD:I dont boot any other OS

Last edited by YamiFrankc (2009-09-01 19:01:59)


Thanks and greetings.

Offline

#2 2009-09-01 19:20:07

Epiphanic
Member
Registered: 2009-02-22
Posts: 44

Re: Cant set time

Run "date hhmmyyyy.ss" in the shell.

h = Hour in 24-hour format
m = Minutes
y = Year (optional)
s = Seconds (optional)

Last edited by Epiphanic (2009-09-01 19:20:28)

Offline

#3 2009-09-01 23:32:00

YamiFrankc
Member
From: Mexico
Registered: 2009-06-19
Posts: 177
Website

Re: Cant set time

That doesnt seems to work...

"bash-4.0# date 1800
date: invalid date `1800'
bash-4.0# date 18:00
date: invalid date `18:00'
bash-4.0# date 18:00
date: invalid date `18:00'
bash-4.0# date
Tue Sep  1 13:25:16 CDT 2009
bash-4.0# man date
bash-4.0# date hh
date: invalid date `hh'
bash-4.0# date 13:27
date: invalid date `13:27'"


Thanks and greetings.

Offline

#4 2009-09-01 23:38:00

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: Cant set time

man hwclock

Offline

#5 2009-09-02 02:56:13

Epiphanic
Member
Registered: 2009-02-22
Posts: 44

Re: Cant set time

I suppose I should've mentioned you need to use superuser privledges (sudo or as root) to adjust the time with the date command.

Offline

#6 2009-09-02 02:56:43

neddie_seagoon
Member
Registered: 2009-08-23
Posts: 121

Re: Cant set time

To quickly set the date use:
date MMDDhhmm

ex:
date 09012145

(9:45 pm Sept 1st)

You can also download ntpd and just run 'ntpdate pool.ntp.org' to sync your clock anytime you notice it's off.

Offline

#7 2009-09-02 03:22:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Cant set time

neddie_seagoon wrote:

You can also download ntpd and just run 'ntpdate pool.ntp.org' to sync your clock anytime you notice it's off.

Don't do that. First, ntpdate is now deprecated and the correct command is "ntpd -q". Second, running that regularly places unnecessary load on the ntp servers, which is not at all appreciated. Third, it might create problems on your system when it leapfrogs the time around.

Instead, install openntpd and let that sync your time automatically and gradually. It's easy to set up and does what it's meant to do quietly in the background.

Last edited by Xyne (2009-09-02 03:23:15)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2009-09-12 05:29:21

occam
Member
From: Melbourne, Australia
Registered: 2005-01-16
Posts: 82

Re: Cant set time

Oh well, I will have to abandon ntpdate after all these years.
However, I have the same problem with the "wrong" time(zone) being displayed.  In my case, I get the correct time (using ntpdate!) when running Slackware.
Even though I have told Arch that I want to use my local timezone, Australia/Melbourne, it believes that my hardware clock uses UTC and "adjusts" it.
I wonder just where Arch specifies that UTC is used?


Moduli non sunt multiplicandi praeter necessitatem

Offline

#9 2009-09-12 05:39:53

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Cant set time

@occam:
To be clear, did you set

HARDWARECLOCK=localtime

(instead of "local")?

Last edited by bernarcher (2009-09-12 05:40:45)


To know or not to know ...
... the questions remain forever.

Offline

#10 2009-09-12 05:49:15

jithin1987
Member
From: Bangalore
Registered: 2009-09-12
Posts: 182

Re: Cant set time

I am having the same issue. In my case my UTC and localtime is interchanged

date
Sat Sep 12 16:48:30 IST 2009
date -u
Sat Sep 12 11:18:32 UTC 2009

Actuallt both this values should be interchanged.


And in my rc.conf HARDWARECLOCK=localtime. Should that be "local" The comment in rc.conf said use UTC or localtime.


Thanks
Jithin

Offline

#11 2009-09-12 05:50:34

jithin1987
Member
From: Bangalore
Registered: 2009-09-12
Posts: 182

Re: Cant set time

Forgot to mention. even if I set the time manually using date -s . After next reboot it goes back to incorrect value. I do not have any other OS installed. I said good bye to my dual boot xp + ubuntu yesterday.


Thanks
Jithin

Offline

#12 2009-09-12 06:25:39

jithin1987
Member
From: Bangalore
Registered: 2009-09-12
Posts: 182

Re: Cant set time

Fixed it. TIme in my bios was wrong. After setting it correctly there arch time is also correct.


Thanks
Jithin

Offline

Board footer

Powered by FluxBB