You are not logged in.

#1 2013-10-27 17:51:14

hachel
Member
Registered: 2011-05-03
Posts: 25

[SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

Hi everybody,

with recent dst-change (this morning) in europe the clock in my panel is now wrong. It it is one hour early (19:50 instead of 18:50).

This is what timedatectl status shows me:

$ sudo timedatectl status
      Local time: Sun 2013-10-27 19:44:03 CET
  Universal time: Sun 2013-10-27 18:44:03 UTC
        RTC time: Sun 2013-10-27 18:44:04
        Timezone: Europe/Berlin (CET, +0100)
     NTP enabled: n/a
NTP synchronized: no
 RTC in local TZ: no
      DST active: no
 Last DST change: DST ended at
                  Sun 2013-10-27 02:59:59 CEST
                  Sun 2013-10-27 02:00:00 CET
 Next DST change: DST begins (the clock jumps one hour forward) at
                  Sun 2014-03-30 01:59:59 CET
                  Sun 2014-03-30 03:00:00 CEST

Both Universal Time and RTC time are correct. So I figured that my panel uses local time.

I googled and checked hwclock:

$ sudo hwclock --show
Sun 27 Oct 2013 19:48:14 CET  -0.298111 seconds

So this is wrong. I tried setting it to system time but that didn't do.
Also I rebooted and checked in BIOS, which is set to the correct time.

Don't know what to do, any help?

Last edited by hachel (2013-10-27 19:01:41)

Offline

#2 2013-10-27 18:04:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

hachel wrote:

checked in BIOS, which is set to the correct time.

What does "correct" mean in this context?  Does the BIOS time match your watch and/or wall clock?  If so, it is wrong.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-10-27 18:10:48

Scimmia
Fellow
Registered: 2012-09-01
Posts: 10,020

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

UTC is a universal time; it's exactly the same everywhere, never adjusted for DST, global position, etc.
Localtime is what the time is right now in your local timezone.

You've told your computer that your RTC is set to UTC. If it's actually set to localtime, you'll have this problem.

Offline

#4 2013-10-27 18:24:01

hachel
Member
Registered: 2011-05-03
Posts: 25

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

In BIOS the time is set to 18:44 (adjusted to keep with original posts time).
So it is both set to UTC and to my correct local time (which is 18:44). The only time that differs from the correct time is the local time set to 19:44.

Offline

#5 2013-10-27 18:28:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

Your correct local time is *not* the same as the correct UTC time ... not if you are really in the CET time zone.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2013-10-27 18:40:56

hachel
Member
Registered: 2011-05-03
Posts: 25

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

sorry, I don't understand. I know for a fact that it's 18:44 where I live. And that's the same as UTC. If it wasn't for dst change which occured this morning it would be 19:44, which is my systems local time.

Offline

#7 2013-10-27 18:43:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

What time zone do you live in?  Are you in the GMT time zone or the CET time zone?

If you are in GMT, your timezone is set wrong, as it says CET.

If you are in CET, then universal time is *not* your local time.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2013-10-27 18:52:41

hachel
Member
Registered: 2011-05-03
Posts: 25

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

Thanks. I live in the CET time zone. What kind of options do I have to get the correct local time? It seems everything is set to the correct values, it just didn't adjust for dst.

Offline

#9 2013-10-27 18:54:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 27,802
Website

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

You need to set your hardware clock to the correct UTC time.  NTPD is one handy way to do this - but you can also just use hwclock or set if via your bios.

For reference, the correct UTC time at the time of this posting is 18:54.

Last edited by Trilby (2013-10-27 18:54:57)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2013-10-27 19:00:49

hachel
Member
Registered: 2011-05-03
Posts: 25

Re: [SOLVED] Issue with and confused about hwclock/localtime/rtc/dst

Thank you very much, I got confused with UTC being universal and always the same, it didn't occur that it might be wrong in my system. I changed the BIOS-time and now everything is correct.

Offline

Board footer

Powered by FluxBB