You are not logged in.

#1 2012-02-05 23:29:24

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

[SOLVED] Time & date wrong:

I have the correct locale set in rc.conf:

LOCALE="en_AU.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="Australia/Sydney"

& also the only one I use in /etc/locale.gen

My machines clock is set correctly.

I occasionally stick a Win7 drive in the machine to play Skyrim. It has the correct time/date. & I have now done the registry mod so that it is using UTC time also. Not that it has solved my problem.

I have run locale.gen both as su root & via sudo, to no avail.

My clock is still running 11 hours fast.

Please can someone tell me what I'm missing here?

Last edited by handy (2012-02-06 07:34:08)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#2 2012-02-05 23:33:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

Post the output of

hwclock --debug
date

And your daemons array from rc.conf.

Offline

#3 2012-02-05 23:47:38

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

Thanks for your quick reply karol. smile

handy ~  $  hwclock --debug
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2012/02/06 10:44:55
Hw clock time : 2012/02/06 10:44:55 = 1328525095 seconds since 1969
Mon 06 Feb 2012 21:44:55 EST  -0.338345 seconds
handy ~  $  date
Mon Feb  6 21:45:20 EST 2012
handy ~  $  
DAEMONS=(@syslog-ng ufw network rpcbind nfs-common nfs-server @netfs @polipo @crond @sshd @sensors @dbus @alsa @stb-sdmin @gpm @udisks @synergys)

Last edited by handy (2012-02-05 23:59:36)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#4 2012-02-05 23:54:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

The hardware UTC read is wrong, because it's still 5th Feb in UTC, so it's your UTC clock that is 11 hours fast.

Offline

#5 2012-02-06 00:02:20

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

karol wrote:

The hardware UTC read is wrong, because it's still 5th Feb in UTC, so it's your UTC clock that is 11 hours fast.

In my locale, it truly is the 6th of Feb.

If the UTC server has got my locale wrong (11 hours fast) how do I fix that?

& why do I seem to be the only person with this problem?

Last edited by handy (2012-02-06 00:03:14)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#6 2012-02-06 00:04:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

You said your machine's clock is set correctly, but hwclock disagrees ;P Try setting it again: https://wiki.archlinux.org/index.php/Time#Set_clock

Offline

#7 2012-02-06 00:06:41

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

The HW clock was/is correct.

It is the output from the "date" command that is incorrect = 11 hours fast.

Last edited by handy (2012-02-06 00:14:01)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#8 2012-02-06 00:18:35

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

I have reset the system clock using:

# date MMDDhhmmYYYY

Which is giving me the correct time display now on my machine.

I'll see if it maintains through a reboot.

[edit:] I just rebooted & now the time is once again 11 hours fast?

Last edited by handy (2012-02-06 00:21:59)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#9 2012-02-06 00:29:25

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: [SOLVED] Time & date wrong:

What he was trying to say is, that your UTC-clock is wrong...it should be about 22:30, on 5th feb UTC by now.
I assume australia is UTC+11, so wrong (UTC+11)+11 hours is 11 hours fast even in Australia wink

Offline

#10 2012-02-06 00:29:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

I'm in UTC +1 timezone:

[karol@black ~]$ LC_ALL=C date
Mon Feb  6 01:26:34 CET 2012
[karol@black ~]$ LC_ALL=C date --utc
Mon Feb  6 00:26:38 UTC 2012

It's just past midnight in Greenwich, not almost noon, as your hwclock is implying:

Time read from Hardware Clock: 2012/02/06 10:44:55
Hw clock time : 2012/02/06 10:44:55 = 1328525095 seconds since 1969

Offline

#11 2012-02-06 00:41:31

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

So how do I reset my UTC clock?

Forgive my stupidity, it is something I continue to grow with age.


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#12 2012-02-06 00:44:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

Use 'hwclock --set' from the wiki link I gave earlier.

Offline

#13 2012-02-06 00:45:17

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: [SOLVED] Time & date wrong:

Not-knowing ain't a problem, not-wanting-to-know is wink

ntpd -qg

Offline

#14 2012-02-06 00:45:31

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

I have, what happens after that?

handy ~  $  sudo hwclock --set --date="2012-02-06 11:45:50"
handy ~  $

[edit:] It didn't change the system time.

Last edited by handy (2012-02-06 00:52:19)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#15 2012-02-06 00:47:05

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

desm0tes wrote:

Not-knowing ain't a problem, not-wanting-to-know is wink

ntpd -qg

Command not found.

Tried to install, says it doesn't exist.

I'm installing ntpdate.

Last edited by handy (2012-02-06 00:48:19)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#16 2012-02-06 00:51:40

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: [SOLVED] Time & date wrong:

You manually set the hardware clock, but to the wrong time big_smile
You should have set it to UTC, not Australian time. wink

ntpd does instead gets the time from an ntp server, so it's ~absolutely correct.
To use it, you need the ntp package.
ntpdate is deprecated...

Last edited by desm0tes (2012-02-06 00:52:28)

Offline

#17 2012-02-06 00:52:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

Offline

#18 2012-02-06 00:56:19

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

desm0tes wrote:

You manually set the hardware clock, but to the wrong time big_smile
You should have set it to UTC, not Australian time. wink

man hwclock wrote:

       --date=date_string
              You  need  this  option  if  you specify the --set or --predict
              functions, otherwise it is ignored.  It specifies the  time  to
              which  to set the Hardware Clock, or the time for which to pre‐
              dict the Hardware Clock reading.  The value of this  option  is
              an argument to the date(1) program.  For example:

                  hwclock --set --date="2011-08-14 16:45:05"

              The argument must be in local time, even if you keep your Hard‐
              ware Clock  in  Coordinated  Universal  time.   See  the  --utc
              option.
.

Offline

#19 2012-02-06 01:03:23

desm0tes
Member
From: 127.0.0.1
Registered: 2012-02-04
Posts: 233
Website

Re: [SOLVED] Time & date wrong:

Ah, ok, my fault...

Offline

#20 2012-02-06 01:06:19

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

I've installed ntp & started reading the site (not even the handbook!) & the following comes to mind - I still don't understand why my clock used to be correct, my OS/X (UTC) clock is correct, my wife's (UTC) computer is correct, but my Arch box is now not. There are not a pile of other east coast of Oz Arch & other computer users flooding forums with the same complaint that I have. So I don't believe that the UTC time server has got it wrong.

Forgive me not being smiley & happy, I happen to be extremely tired at the moment so it doesn't help. I am very grateful for the help I have received, though I'm still at a loss as to just what the cause of this problem is.

Last edited by handy (2012-02-06 01:07:43)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#21 2012-02-06 01:13:40

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

Do I just go with local time & reset the time when daylight saving does its thing twice a year? & give up on UTC.

Last edited by handy (2012-02-06 01:14:09)


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#22 2012-02-06 01:17:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

After you've set the hwclock, did the output of 'hwclock --debug' change or is it still suggesting it's noon in UTC?

Offline

#23 2012-02-06 01:22:45

handy
Member
From: Oz
Registered: 2008-03-26
Posts: 719

Re: [SOLVED] Time & date wrong:

Its an hour fast?

It used to be correct before I changed it. I didn't make a typo.


I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!

Offline

#24 2012-02-06 01:25:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

Can you post the output of 'hwclock --debug'?
UTC = GMT i.e. the time it is in London atm.

[karol@black ~]$ LC_ALL=C date --utc
Mon Feb  6 01:21:38 UTC 2012

It's the middle of the night in Europe.

Offline

#25 2012-02-06 01:37:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Time & date wrong:

My clock was 2 minutes late, so I adjusted the time:

[karol@black ~]$ hwclock --show
pon, 6 lut 2012, 02:27:55  -0.893149 seconds
[karol@black ~]$ sudo hwclock --set --date="2012-02-06 02:30:03"
[karol@black ~]$ hwclock --show
pon, 6 lut 2012, 02:30:07  -0.587863 seconds

but the date has not changed yet:

[karol@black ~]$ date
pon, 6 lut 2012, 02:28:27 CET
[karol@black ~]$ sudo hwclock --hctosys
[karol@black ~]$ date
pon, 6 lut 2012, 02:30:36 CET

Now it has :-)


This should be all that's needed:
* hwclock --set --date="some date and time"
* hwclock --hctosys

Offline

Board footer

Powered by FluxBB