You are not logged in.

#1 2017-02-18 09:22:50

Richard Stockworth
Member
Registered: 2016-12-26
Posts: 13

[SOLVED] Wrong time

Hi,

I should have the hour from Paris (10:21) but I have 11:21.

timedatectl prints:

Local time: Sat 2017-02-18 11:21:23 CET
Universal time: Sat 2017-02-18 10:21:23 UTC
RTC time: Sat 2017-02-18 10:21:23
Time zone: Europe/Paris (CET, +0100)
Network time on: no
NTP synchronized: no
RTC in local TZ: no

hwclock --debug prints:

hwclock from util-linux 2.29.1
Using the /dev interface to the clock.
Last drift adjustment done at 1487274087 seconds after 1969
Last calibration done at 1487274087 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: 2017/02/18 10:22:20
Hw clock time : 2017/02/18 10:22:20 = 1487413340 seconds since 1969
Time since last adjustment is 139253 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2017-02-18 11:22:19.686773+0100

It seems that my hardware clock is right.

I tried:

timedatectl set-local-rtc 0

and

hwclock --hctosys

But it doesn't change anything.

Do you have ideas?

Last edited by Richard Stockworth (2017-02-19 08:37:27)

Offline

#2 2017-02-18 09:46:35

loqs
Member
Registered: 2014-03-06
Posts: 17,198

Re: [SOLVED] Wrong time

Richard Stockworth wrote:

I should have the hour from Paris (10:21) but I have 11:21.

timedatectl prints:

Local time: Sat 2017-02-18 11:21:23 CET
Universal time: Sat 2017-02-18 10:21:23 UTC
RTC time: Sat 2017-02-18 10:21:23
Time zone: Europe/Paris (CET, +0100)
Network time on: no
NTP synchronized: no
RTC in local TZ: no

Local time is 11:21,  RTC is not using localtime but UTC so it 10:21 this all seems correct.
Edit:
Local time is 10:21,  RTC is not using localtime but UTC so it should be set to 9:21

Last edited by loqs (2017-02-18 09:59:11)

Offline

#3 2017-02-18 09:53:14

Richard Stockworth
Member
Registered: 2016-12-26
Posts: 13

Re: [SOLVED] Wrong time

The date command prints:

Sat Feb 18 11:21:37 CET 2017

What do you suggest?

Last edited by Richard Stockworth (2017-02-18 10:11:41)

Offline

#4 2017-02-18 10:12:49

loqs
Member
Registered: 2014-03-06
Posts: 17,198

Re: [SOLVED] Wrong time

Set the time using hwclock to be the correct time in UTC so one hour earlier than the time you want displayed,  you can also set the time using timedatectl not sure if it expects the input to be in localtime or UTC.
Edit:
Other solutions
Time#Clock_shows_a_value_that_is_neither_UTC_nor_local_time
or

# timedatectl set-ntp true

Last edited by loqs (2017-02-18 10:19:08)

Offline

#5 2017-02-18 20:38:41

Richard Stockworth
Member
Registered: 2016-12-26
Posts: 13

Re: [SOLVED] Wrong time

I reinstalled without executing the

hwclock --systohc

command during the installation and know time is correct.

Thank you for your help.

Offline

#6 2017-02-18 20:44:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Wrong time

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB