You are not logged in.

#1 2012-11-04 18:29:55

Sinani201
Member
From: Los Angeles, CA
Registered: 2011-05-21
Posts: 9
Website

[SOLVED] Time issues on startup

Whenever I start up my computer, the time is off by a few hours. After around 5 minutes, it corrects itself back to the same time.

I followed the instructions on the wiki for fixing the Windows time in dual boot, but I still have the problem (and now Windows has the same problem too).

If I use timedatectl status to troubleshoot, I get "Failed to issue method call: Activation of org.freedesktop.timedate1 timed out"

Any ideas?

Last edited by Sinani201 (2012-11-04 21:20:49)

Offline

#2 2012-11-04 18:40:13

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Time issues on startup

Please post the output of the following command (use [code ] tags around the output please):

sudo hwclock --debug

Are you fully updated to systemd?

What does "After around 5 minutes, it corrects itself back to the same time." mean? Do you mean that the clock resets itself to the correct time after five minutes, or that you set it to the correct time, and after five minutes it's wrong again?

Last edited by 2ManyDogs (2012-11-04 18:43:08)

Offline

#3 2012-11-04 19:10:44

Sinani201
Member
From: Los Angeles, CA
Registered: 2011-05-21
Posts: 9
Website

Re: [SOLVED] Time issues on startup

hwclock from util-linux 2.22.1
Using /dev interface to clock.
Last drift adjustment done at 1344425356 seconds after 1969
Last calibration done at 1344425356 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2012/11/04 11:09:10
Hw clock time : 2012/11/04 11:09:10 = 1352027350 seconds since 1969
Sun 04 Nov 2012 03:09:10 AM PST  -0.578653 seconds

11:09:10 is the correct time that should be showing
03:09:10 is what the computer would be showing after starting up (the bad time).

2ManyDogs wrote:

What does "After around 5 minutes, it corrects itself back to the same time." mean? Do you mean that the clock resets itself to the correct time after five minutes, or that you set it to the correct time, and after five minutes it's wrong again?

I mean that, when the computer first starts, the time is wrong. After about 5 minutes, the clock automatically corrects itself to the proper time and stays there. It's never "5 minutes off."

And yes I am fully updated to systemd.

Last edited by Sinani201 (2012-11-04 19:12:20)

Offline

#4 2012-11-04 19:25:12

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Time issues on startup

Is that output before or after the correction? Are you in a timezone where your localtime is the same as UTC? What is the output of the following commands:

ls -l /etc/localtime
cat /etc/timezone
cat /etc/adjtime
grep HARDWARE /etc/rc.conf

Last edited by 2ManyDogs (2012-11-04 19:27:26)

Offline

#5 2012-11-04 19:49:28

Sinani201
Member
From: Los Angeles, CA
Registered: 2011-05-21
Posts: 9
Website

Re: [SOLVED] Time issues on startup

That output is after the correction.

~ $ ls -l /etc/localtime
lrwxrwxrwx 1 root root 39 Aug  8 04:26 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles
~ $ cat /etc/timezone
America/Los_Angeles
~ $ cat /etc/adjtime
0.000000 1344425356 0.000000
1344425356
UTC
~ $ grep HARDWARE /etc/rc.conf
~ $ 

Offline

#6 2012-11-04 20:11:01

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Time issues on startup

Sinani201 wrote:
hwclock from util-linux 2.22.1
Using /dev interface to clock.
Last drift adjustment done at 1344425356 seconds after 1969
Last calibration done at 1344425356 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
[b]Time read from Hardware Clock: 2012/11/04 11:09:10[/b]
Hw clock time : 2012/11/04 11:09:10 = 1352027350 seconds since 1969
Sun 04 Nov 2012 03:09:10 AM PST  -0.578653 seconds

11:09:10 is the correct time that should be showing
03:09:10 is what the computer would be showing after starting up (the bad time).

Your hardware clock is set to localtime, but your configuration says it's set to UTC, so the 8 hours are subtracted again.

Edit: you say Windows has the same problem. That would mean Windows is also configured to interpret hwclock as UTC (with registry fix), so the only thing you need now is to actually set your hwclock to the correct time in UTC.

Last edited by Raynman (2012-11-04 20:14:40)

Offline

#7 2012-11-04 20:15:54

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Time issues on startup

Your hardware clock is set to local time, but you're telling the system to correct it to Los Angeles time. Either set the hardware clock to UTC, or change the timezone settings. I'm not sure why "timedatectl" doesn't work for you -- have you done "pacman -Syu" lately?

Try this:

sudo hwclock --set --date="2012-11-04 hh:mm:ss"

Where hh:mm:ss is the hour, minute, and second in your local time (not UTC).

Or wait until after the correction, and use this command to set the hardware clock to the (now correct) system time:

sudo hwclock --systohc --utc

Last edited by 2ManyDogs (2012-11-04 21:04:52)

Offline

#8 2012-11-04 21:20:26

Sinani201
Member
From: Los Angeles, CA
Registered: 2011-05-21
Posts: 9
Website

Re: [SOLVED] Time issues on startup

2ManyDogs wrote:

Or wait until after the correction, and use this command to set the hardware clock to the (now correct) system time:

sudo hwclock --systohc --utc

That got it working. Thanks a ton!

Offline

#9 2012-11-04 21:21:31

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Time issues on startup

You're welcome, and thanks for marking it [solved].

Offline

Board footer

Powered by FluxBB