You are not logged in.

#1 2015-10-26 20:12:44

Bednar
Member
Registered: 2015-09-19
Posts: 73

[SOLVED]system time is wrong

Hi guys,

sudo hwclock --debug

hwclock from util-linux 2.27
Using the /dev interface to the clock.
Last drift adjustment done at 1445886377 seconds after 1969
Last calibration done at 1445886377 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2015/10/26 20:09:20
Hw clock time : 2015/10/26 20:09:20 = 1445886560 seconds since 1969
Time since last adjustment is 183 seconds
Calculated Hardware Clock drift is 0.000000 seconds
Mon 26 Oct 2015 20:09:19 CET  .577572 seconds

date

Mon 26 Oct 21:11:13 CET 2015

My system displays the date shown by hwinfo while the correct one is the one shown by date command.

How can I fix this so that the correct time is displayed?

Thanks,

B

Last edited by Bednar (2015-11-12 10:40:56)

Offline

#2 2015-10-26 20:20:51

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED]system time is wrong

What is the output of

$ timedatectl

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-10-26 20:24:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [SOLVED]system time is wrong

You posted this at 13:!2 PDT.  At that time, UTC was 20:13, So it would appear that your hardware clock is set correctly.  At that time, Central European Time was 21:13.

Where in the world are you?

Also, check (and post) the output of timedatectl

Also, this is unexpected:

Hardware clock is on local time
Assuming hardware clock is kept in local time.

Any idea why it thinks that?  Did you change a configuration file?

Edit:  Oh!  A full moderator hat trick big_smile

Last edited by ewaller (2015-10-26 20:28:17)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2015-10-26 20:26:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]system time is wrong

Bednar wrote:

My system displays the date shown by hwinfo while the correct one is the one shown by date command.

What do you mean by your "system"?  You just showed us how your system shows each of the different times.  Do you mean some DE taskbar shows the wrong time, or conky, or something else?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2015-10-26 20:28:29

Bednar
Member
Registered: 2015-09-19
Posts: 73

Re: [SOLVED]system time is wrong

Hi guys,

      Local time: Mon 2015-10-26 21:25:26 CET
  Universal time: Mon 2015-10-26 20:25:26 UTC
        RTC time: Mon 2015-10-26 20:24:54
       Time zone: Europe/Warsaw (CET, +0100)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode can not be fully supported. It will create various problems
         with time zone changes and daylight saving time adjustments. The RTC
         time is never updated, it relies on external facilities to maintain it.
         If at all possible, use RTC in UTC by calling
         'timedatectl set-local-rtc 0'.

so I run timedatectl set-local-rtc 0 and again sudo hwclock --debug

hwclock from util-linux 2.27
Using the /dev interface to the clock.
Last drift adjustment done at 1445886377 seconds after 1969
Last calibration done at 1445886377 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: 2015/10/26 20:27:09
Hw clock time : 2015/10/26 20:27:09 = 1445891229 seconds since 1969
Time since last adjustment is 4852 seconds
Calculated Hardware Clock drift is 0.000000 seconds
Mon 26 Oct 2015 21:27:08 CET  .046337 seconds

I am located in Poland. CET. Time now is 21:28. My clock shows 20:28 hmm

@Trilby

XFCE time and date widget.
B

Last edited by Bednar (2015-10-26 20:29:35)

Offline

#6 2015-10-26 20:31:20

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [SOLVED]system time is wrong

I wonder if the clock you are looking at is using an incorrect rule for calculating what we in the US call "Daylight Savings".  I believe most of Europe is back to standard time, but 48 of the 50 states (I think) are still wacked by an hour until Sunday.

BTW, your system seems to be working properly.  I think it is just your widget.

Last edited by ewaller (2015-10-26 20:32:23)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#7 2015-10-26 20:36:17

Bednar
Member
Registered: 2015-09-19
Posts: 73

Re: [SOLVED]system time is wrong

ewaller wrote:

I wonder if the clock you are looking at is using an incorrect rule for calculating what we in the US call "Daylight Savings".  I believe most of Europe is back to standard time, but 48 of the 50 states (I think) are still wacked by an hour until Sunday.

BTW, your system seems to be working properly.  I think it is just your widget.

Thanks, appreciate it. It indeed seems to be the clock plugin for XFCE showing then incorrect time. In Poland DST ended last Sunday and the clock widget hasn't updated.

Offline

#8 2015-10-26 21:13:56

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED]system time is wrong

Shouldn't the clock widget get its time just from the systems time via `date` command or something similar where timezone and DST changes are already included?

Last edited by dice (2015-10-26 21:14:07)


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#9 2015-10-26 22:10:01

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED]system time is wrong

For me, both the Clock- and the DateTime-widget in XFCE work correctly.
I'm in Germany, where the DST ended last Sunday, just like in Poland.

However, my hardware clock is using UTC, which is probably the relevant difference.
It seems like your clock is not actually using local time but instead local summer time, for whatever reason.

dice wrote:

Shouldn't the clock widget get its time just from the systems time via `date` command or something similar where timezone and DST changes are already included?

I do also think so, especially since the format can be specified using the same syntax as for the `date` command.

Edit:
Your local DST would be +1 instead of -1 in relation to the correct time.

Last edited by respiranto (2015-10-26 22:13:24)

Offline

#10 2015-10-26 22:18:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]system time is wrong

Everyone here is drastically overthinking this.  Everything is working properly now.  Just set your (hardware) clock to the correct time.

As seen in post 5, the problem was that your hardware clock was in local time not UTC and the system new the hardware clock was in local time not UTC - but as the warning indicates this isn't always handled properly.

You then reset the system so now it *doesn't know* that the hardware clock is in local time and your system now thinks the hardware clock is UTC as per normal ... but you never actually changed the time on the hardware clock.  CET is one hour ahead of UTC so a one hour descrepancy makes sense.

Can we see the output of timedatectl again now that you made the change in post 5?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2015-10-26 22:23:27

Bednar
Member
Registered: 2015-09-19
Posts: 73

Re: [SOLVED]system time is wrong

Hi Trilby

I am not sure I understand what I need to do next.

here's timedatectl after making the change:

      Local time: Mon 2015-10-26 23:19:46 CET
  Universal time: Mon 2015-10-26 22:19:46 UTC
        RTC time: Mon 2015-10-26 22:19:46
       Time zone: Europe/Warsaw (CET, +0100)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

Still, the clock shows the incorrect time (22:19) instead of 23:19.

B

Offline

#12 2015-10-26 22:39:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [SOLVED]system time is wrong

But that is my point.  That UTC is correct.  The hardware clock is set to UTC.  The local time is an hour ahead.   That is all correct.
The output of date was correct.   I think the widget is being brain dead.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#13 2015-10-26 22:42:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]system time is wrong

Hmm - odd.  OK it's not what I thought.

Have you loged out of whatever DE this is and back in since that change?  I'm not sure that would affect it, but not knowing how the widget in question works, it may just query the system at startup then keep time from there.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2015-10-26 22:48:07

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED]system time is wrong

This is not really on topic, but for me the time displayed above posts is UTC+2, although, in the settings, I have specified UTC+1.
Does somebody else have the same issue?

on topic:
If what Trilby suggests does not work, have you tried the 'Clock' widget?
And what is the format 'DateTime' is currently configured to use?

Last edited by respiranto (2015-10-26 22:50:18)

Offline

#15 2015-10-26 22:54:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]system time is wrong

respiranto wrote:

This is not really on topic, but for me the time displayed above posts is UTC+2, although, in the settings, I have specified UTC+1.

No it's not on topic: uncheck the DST box in your profile.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#16 2015-10-26 22:59:29

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED]system time is wrong

Trilby wrote:

No it's not on topic: uncheck the DST box in your profile.

Thank you!
If I just had taken some seconds more to skim over that page ...
I already wondered why it was using DST as 'default'.

Offline

#17 2015-11-12 10:40:21

Bednar
Member
Registered: 2015-09-19
Posts: 73

Re: [SOLVED]system time is wrong

for those having the same issue, the XFCE panel did not update itself after DST ended. The solution was to... remove and re-add the applet to the panel big_smile

Offline

Board footer

Powered by FluxBB