Strange problem with time

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Strange problem with time

Postby tomane » Sep 7th, '20, 08:23

Hello,
For some days I have had a weird problem with the time of my mageia (7.1):
- it shows me two hours less than normal time on conky
- the time is not displayed in the dashboard clock

If I go into MCC, "manage date and time", I have the correct time and the correct time zone displayed (Europ/Paris).
I checked the system time in the BIOS, it Ok.

On the other hand, if I run date or timedatectl, I have:
Code: Select all
$ date
lun. sept.  7 06:12:42 UTC 2020
$ timedatectl
               Local time: lun. 2020-09-07 06:12:52 Europe
           Universal time: lun. 2020-09-07 06:12:52 UTC
                 RTC time: lun. 2020-09-07 08:12:52
                Time zone: Europe/Paris (Europe, +0000)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot 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'.

The correct time is 08:12:52 paris time.
From what I see on the internet, I should have
Code: Select all
               Local time: lun. 2020-09-07 08:12:52 CEST

I tried to change the time zone, if I put "Europe / Rome", then it becomes "normal" again: the displayed time is the correct one and it appears in the dashboard.
If I run timedatectl
$ date;timedatectl
Code: Select all
lun. sept.  7 08:20:43 CEST 2020
               Local time: lun. 2020-09-07 08:20:43 CEST
           Universal time: lun. 2020-09-07 06:20:43 UTC
                 RTC time: lun. 2020-09-07 10:20:38
                Time zone: Europe/Rome (CEST, +0200)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot 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'.
It's like I have a problem with the Paris time zone.
Thanks for your help !
BTW, I used manaclock to activate ntp, seems more reliable than MCC.
Last edited by isadora on Sep 7th, '20, 08:47, edited 1 time in total.
Reason: Please place command-output between [CODE]-tags, to improve readability, thanks ahead!!! ;)
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby doktor5000 » Sep 7th, '20, 18:26

What desktop environment do you use? For your conky, what function does it use to display the time ?

Also, did you configure Europe/Paris as timezone initially ? And what would be your actual timezone ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Strange problem with time

Postby tomane » Sep 7th, '20, 18:37

Yes, it always have been my timezone. I noticed that time had disappeared from the dashboard clock some days ago, after an update I think, but I'm not absolutely sure, and looking for solutions I changed to Europe/rome. I also tried "# rpm -Va " but it didn't fix it.
Thanks
Last edited by doktor5000 on Sep 7th, '20, 19:09, edited 1 time in total.
Reason: removed fullquote
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby doktor5000 » Sep 7th, '20, 19:11

You didn't mention what desktop environment you use.

And rpm -Va will not fix anything, it will only show the results of a verification of all installed rpm packages, but it will not change anything.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Strange problem with time

Postby tomane » Sep 7th, '20, 22:15

Oups ! sorry.
I'm using plasma. My conky script uses ${time %H:%M}
Many thanks
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby tomane » Sep 10th, '20, 16:30

No clue ?
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby doktor5000 » Sep 10th, '20, 17:26

Your timezone seems even more messed up after your change to europe/rome. Also in your first ouput it says

System clock synchronized: no

and in the later one
System clock synchronized: yes


Did you change something in between ?

For the clock plasmoid, you might need to unlock plasmoids, then try to add one of the clock applets to the panel again.
Are your time settings OK when you run
Code: Select all
kcmshell5 clock
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Strange problem with time

Postby jiml8 » Sep 10th, '20, 19:20

Your printouts show that the ntpd service is inactive. Try activating it.

Have you perhaps made some change in your router or firewall that might block the ntp service from the internet?
jiml8
 
Posts: 1253
Joined: Jul 7th, '13, 18:09

Re: Strange problem with time

Postby tomane » Sep 10th, '20, 22:42

doktor5000 wrote:Your timezone seems even more messed up after your change to europe/rome. Also in your first ouput it says

System clock synchronized: no

and in the later one
System clock synchronized: yes


Did you change something in between ?

Yes, I enabled it with manaclock, as I said but NTP activation seems not working on my PC.
doktor5000 wrote:For the clock plasmoid, you might need to unlock plasmoids, then try to add one of the clock applets to the panel again.
did it, but it's the same. Clock plasmoid runs fine with Rome (time in dashboard), but not with Paris (no time in dashboard, see screenshot)
doktor5000 wrote:Are your time settings OK when you run
Code: Select all
kcmshell5 clock
You mean if I choose paris as the time zone ? yes, except the 2 hours of difference.
I put some screenshots of kcmshell5 clock, manaclock, clock plasmoid after I changed back from time zone Rome to Paris.Time now is wrong
timedatectl
Code: Select all
timedatectl
               Local time: jeu. 2020-09-10 20:19:50 Europe
           Universal time: jeu. 2020-09-10 20:19:50 UTC
                 RTC time: ven. 2020-09-11 00:19:37
                Time zone: Europe/Paris (Europe, +0000)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: yes

Warning: The system is configured to read the RTC time in the local time zone.
         This mode cannot 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'.

I've got a Mageia virtual box on the same PC with a recent install of Mga7.1, if i run timedatecl
Code: Select all
$ timedatectl
               Local time: ven. 2020-09-11 00:12:13 CEST
           Universal time: jeu. 2020-09-10 22:12:13 UTC
                 RTC time: jeu. 2020-09-10 22:12:13
                Time zone: Europe/Paris (CEST, +0200)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no
I suppose the time is wrong (+2h) only because it's based upon the host time which is wrong but
see that we have
Code: Select all
                Time zone: Europe/Paris (CEST, +0200)
which is correct, as on my PC it is
Code: Select all
                Time zone: Europe/Paris (Europe, +0000)
I would say some config file is corrupted but which one?
Attachments
clock_plasmoid.png
clock_plasmoid.png (9.69 KiB) Viewed 1838 times
manaclock.png
manaclock.png (86.3 KiB) Viewed 1838 times
kcmshell5 clock.png
kcmshell5 clock.png (109.71 KiB) Viewed 1838 times
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby tomane » Sep 11th, '20, 12:46

jiml8 wrote:Your printouts show that the ntpd service is inactive. Try activating it.

Have you perhaps made some change in your router or firewall that might block the ntp service from the internet?

Hi,
I can't activate NTP. I check the box but if I close the window and reopen it it appears unchecked.
I haven't done anything for blocking nor enabling ntp on the distrib firewall. I'm not sure a ntp client needs a port opening.
BTW, I tried activating ntp on my mageia VB on the same PC and there is no problem.
Last edited by tomane on Sep 11th, '20, 16:40, edited 1 time in total.
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58

Re: Strange problem with time

Postby doktor5000 » Sep 11th, '20, 16:36

Please post the output as root of

Code: Select all
systemctl status ntpd -al
cat /etc/sysconfig/clock
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Strange problem with time

Postby tomane » Sep 11th, '20, 16:47

Thanks for your reply !
Code: Select all
$ sudo systemctl status ntpd -al
Unit ntpd.service could not be found.
$ sudo cat /etc/sysconfig/clock
ARC=false
UTC=false
ZONE=Europe/Rome

(I changed the timezone back to europe/rome to have a correct time)
tomane
 
Posts: 41
Joined: Jun 30th, '13, 19:58


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron