You are not logged in.

#1 2013-06-04 12:44:20

linduxed
Member
Registered: 2008-10-12
Posts: 64
Website

[SOLVED] Computer boots two hours into the future

Here's the situation:

  • The BIOS clock is correctly set.

  • I've done "hwclock --systohc --utc" during the installation process.

  • I've done "ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime"

Despite this whenever I boot, the time is two hours into the future. NTP corrects this for me over time, but it's still a weird behaviour that I'd like to get rid of.

Last edited by linduxed (2013-06-04 21:24:19)

Offline

#2 2013-06-04 12:57:30

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

Re: [SOLVED] Computer boots two hours into the future

What's the output of 'timedatectl'?

Offline

#3 2013-06-04 13:07:40

linduxed
Member
Registered: 2008-10-12
Posts: 64
Website

Re: [SOLVED] Computer boots two hours into the future

      Local time: tis 2013-06-04 15:07:02 CEST
  Universal time: tis 2013-06-04 13:07:02 UTC
        Timezone: Europe/Stockholm (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  sön 2013-03-31 01:59:59 CET
                  sön 2013-03-31 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  sön 2013-10-27 02:59:59 CEST
                  sön 2013-10-27 02:00:00 CET

Offline

#4 2013-06-04 13:30:36

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: [SOLVED] Computer boots two hours into the future

Change hardware clock from CEST to UTC.

There's a wiki article on time if you want to know why.

Offline

#5 2013-06-04 13:44:08

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

Re: [SOLVED] Computer boots two hours into the future

mich41 wrote:

Change hardware clock from CEST to UTC.

There's a wiki article on time if you want to know why.

I think that's what 'hwclock --systohc --utc' does.


What's the output of 'cat /etc/adjtime'?
What's the output of 'timedatectl' right after boot, before NTP kicks in?

Offline

#6 2013-06-04 13:47:23

linduxed
Member
Registered: 2008-10-12
Posts: 64
Website

Re: [SOLVED] Computer boots two hours into the future

"cat /etc/adjtime"

0.000000 1370128152 0.000000
1370128152
UTC

"timedatectl" right after booting:

      Local time: tis 2013-06-04 17:52:56 CEST
  Universal time: tis 2013-06-04 15:52:56 UTC
        Timezone: Europe/Stockholm (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  sön 2013-03-31 01:59:59 CET
                  sön 2013-03-31 03:00:00 CEST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  sön 2013-10-27 02:59:59 CEST
                  sön 2013-10-27 02:00:00 CET

Last edited by linduxed (2013-06-04 13:54:01)

Offline

#7 2013-06-04 14:00:36

linduxed
Member
Registered: 2008-10-12
Posts: 64
Website

Re: [SOLVED] Computer boots two hours into the future

Reading through the "Time standard" section of the Time article on the wiki made me realize that mich41 is right, I should just set the hardware clock to UTC. It solved the problem.

Last edited by linduxed (2013-06-04 21:23:44)

Offline

#8 2013-06-04 22:41:29

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

Re: [SOLVED] Computer boots two hours into the future

I'm confused. Please tell me how exactly did you solve it, as your recently-updated adjtime says you're already using UTC.

Offline

#9 2013-06-04 22:50:27

linduxed
Member
Registered: 2008-10-12
Posts: 64
Website

Re: [SOLVED] Computer boots two hours into the future

I had done everything as instructed in the Installation Guide, which recommends configuring everything for UTC. My BIOS time however wasn't set to UTC time, it was set to the local time, which is UTC+2. I subtracted two hours from the BIOS clock (moved it from CEST to UTC) and then the time was displayed correctly when booted up.

Offline

#10 2013-06-04 22:53:12

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Computer boots two hours into the future

You should have used "hwclock --systohc --utc" (after syncing to ntp or otherwise setting the correct system time).  This provides initial creation of the /etc/adjtime file that handles clock drift.

Either that or stop driving your Delorian 88 MPH or faster... this has been known to cause time issues since 1984.

Offline

#11 2013-06-04 22:55:52

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

Re: [SOLVED] Computer boots two hours into the future

Ah, now I get it, although I don't understand why would you set it like this in the first place ;P

Offline

Board footer

Powered by FluxBB