You are not logged in.
Hello
I realised some days ago that the wrong time was presented and started looking into it. I found out that /etc/localtime is a normal file instead of a symlink. Deleted it and created the symlink again, which resulted in immediate correct display of the time. Rebooted and...same again.
A few months ago the same topic was presented ((etc/localtime is a binary file), but the outcome there is not clear to me.
Checked whether I did make a soft link, repeated the procedure and rebooted. .. same again.
Here some info:
timedatectl && sudo hwclock --debug && ls -l /etc/localtime
Local time: Wed 2015-12-02 10:12:21 UTC
Universal time: Wed 2015-12-02 10:12:21 UTC
RTC time: Wed 2015-12-02 10:12:22
Time zone: n/a (UTC, +0000)
Network time on: no
NTP synchronized: no
RTC in local TZ: no
hwclock from util-linux 2.27
Using the /dev interface to the clock.
Last drift adjustment done at 1427374066 seconds after 1969
Last calibration done at 1427374066 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/12/02 10:12:23
Hw clock time : 2015/12/02 10:12:23 = 1449051143 seconds since 1969
Time since last adjustment is 21677077 seconds
Calculated Hardware Clock drift is 100186.886417 seconds
Wed 02 Dec 2015 11:12:22 CET .202405 seconds
-rw-r--r-- 2 root root 2971 Oct 4 12:05 /etc/localtimeI deleted the /etc/localtime once again, created the symlink to my timezone, rebooted and ... perfectly reproducible problem ![]()
Any ideas why this is happening?
Lokesh
Last edited by lokesh987 (2015-12-02 11:13:48)
Offline
I doubt it's the cause of your problem, but your UTC is wrong. Is that a deliberate workaround?
Please post the output that Trilby requested in post #5 in the linked thread.
Also try setting the symlink with datetimectl.
timedatectl set-timezone xxx/xxxAnd check the timedatectl service after a reboot, see if there's anything suspicious in the logs.
systemctl status systemd-timedated.serviceSakura:-
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
Thanks for taking care for this.
... your UTC is wrong. Is that a deliberate workaround?
Frankly, I have no clue.
Please post the output that Trilby requested in post #5 in the linked thread.
file /etc/localtime /etc/localtime: timezone data, version 2, 13 gmt time flags, 13 std time flags, no leap seconds, 184 transition times, 13 abbreviation chars
And check the timedatectl service after a reboot, see if there's anything suspicious in the logs.
Checked it (without setting the symlink with timedatectl)
systemctl status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/usr/lib/systemd/system/systemd-timedated.service; static; vendor preset: disabled)
Active: inactive (dead) since Wed 2015-12-02 11:15:03 CET; 1h 19min ago
Docs: man:systemd-timedated.service(8)
man:localtime(5)
http://www.freedesktop.org/wiki/Software/systemd/timedated
Process: 5243 ExecStart=/usr/lib/systemd/systemd-timedated (code=exited, status=0/SUCCESS)
Main PID: 5243 (code=exited, status=0/SUCCESS)
Dec 02 11:14:33 Arch_Linux systemd[1]: Starting Time & Date Service...
Dec 02 11:14:33 Arch_Linux systemd-timedated[5243]: /etc/localtime should be a symbolic link to a time zone data file in /usr/share/zoneinfo/
Dec 02 11:14:33 Arch_Linux systemd[1]: Started Time & Date Service.It appears that this system is not active. According to this thread it is not supposed to be started manually. Who turned it off?
I tried your suggestion to set the symlink with timedatectl, which replaced the binary file with a symlink. Lets see after reboot... I'll be back in a minute ....
Offline
So I am back...
After reboot the symlink remains, meaning the time is shown correctly.
The systemd-timedated.service is still inactive:
systemctl -l status systemd-timedated.service
● systemd-timedated.service - Time & Date Service
Loaded: loaded (/usr/lib/systemd/system/systemd-timedated.service; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-timedated.service(8)
man:localtime(5)
http://www.freedesktop.org/wiki/Software/systemd/timedatedNotwithstanding, timedatectl spits out the correct local time info:
timedatectl status
Local time: Wed 2015-12-02 13:06:32 CET
Universal time: Wed 2015-12-02 12:06:32 UTC
RTC time: Wed 2015-12-02 12:06:33
Time zone: Europe/Paris (CET, +0100)
Network time on: no
NTP synchronized: no
RTC in local TZ: noAnyway, this seems to be solved. Thank you very much!
Lokesh
Offline
Your UTC is still wrong, so your localtime is an hour ahead (it's only 12:28 CET now) , you can fix that with ntpd or systemd-timesyncd.service. Once it's got the correct time, store it in the hardware clock with 'hwclock --systohc --utc'
Don't worry about systemd-timedated.service being disabled, that just means it's not explicitly enabled; it's still run.
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
Your UTC is still wrong
How do you know that, is there a way to see this? UTC is 1 hour behind my local time, so it should be correct, right? ![]()
But, I did all fixes you proposed, but nothig changed, except that timedatectl no is :
timedatectl status
Local time: Wed 2015-12-02 12:58:48 CET
Universal time: Wed 2015-12-02 11:58:48 UTC
RTC time: Wed 2015-12-02 11:58:48
Time zone: Europe/Paris (CET, +0100)
Network time on: no
NTP synchronized: yes
RTC in local TZ: noSo I can switch of systemd-timesyncd.service again?
Cheers
Lokesh
Offline
Yes, that's fixed it. As for how I know, well, in your previous post you had "Universal time: Wed 2015-12-02 12:06:32 UTC", but when you posted it, it was only 11:12 UTC. Compare the two timedatectl outputs, you'll see that you've gone back in time an hour.
You can disable systemd-timesyncd if you have no use for it. There's no harm in leaving it enabled though.
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
Thanks WorMzy,
this tiny bit can be a real pain in some places ![]()
The "time" - Wiki is not exhaustive to include these commands (yet), but probably this is not only me having this problem.
Cheers again
Lokesh
Offline