Pi initial Startup clock is messed up (Solved)

General discussion about RuneAudio. Do not post any support or feature requests here.

Pi initial Startup clock is messed up (Solved)

Postby irishwill2008 » 13 Apr 2018, 11:41

Hi guys,

This isnt a major thing but always grabbed my curiosity.
First let me state that running:
Code: Select all
timedatectl status

I receive the correct timezone information.

I receive:
Code: Select all
 Local time: Fri 2018-04-13 11:33:50 IST
  Universal time: Fri 2018-04-13 10:33:50 UTC
        RTC time: n/a
       Time zone: Europe/Dublin (IST, +0100)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no


When the pi boots the times stamped on the services etc is like 2 years ago (Not using current time as if its not synced yet?).

Example, if i do a simple:
Code: Select all
systemctl status rune_PL_wrk


It states:
Code: Select all
Active: active (running) since Mon 2016-02-22 14:40:18 GMT; 2 years 1 months ago

All services started time stamps around then..?

Now if i restart a service or manually start one it timestamps to the current and correct time/date? It seems something for the clock setup is not running before these startup.

Would love your inputs.

Regards,

Will.
Last edited by irishwill2008 on 16 Apr 2018, 09:10, edited 1 time in total.
irishwill2008
 
Posts: 151
Joined: 26 Jul 2016, 14:49
Location: Ireland

Re: Pi initial Startup clock is messed up.

Postby hondagx35 » 13 Apr 2018, 16:07

Hi Will,

When the pi boots the times stamped on the services etc is like 2 years ago (Not using current time as if its not synced yet?).

Arch Linux uses "systemd" to start all the services.
"systemd" is able to start all the services in parallel, so you get very short boot times.
This has some drawback like the one you encountered.
"systemd" does not wait for "timesyncd" or "ntpd" to synchronize the time.
If this is vital for you, you can hack "systemd" to wait until your network is up and the time is synced.
I think there is no need for this.

Frank
User avatar
hondagx35
 
Posts: 2957
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Pi initial Startup clock is messed up.

Postby janui » 13 Apr 2018, 20:23

Hi irishwill2008,

Personally, I agree with Frank. But if it really really irritates you, fake-hwclock could be a solution. See here for details: https://wiki.archlinux.org/index.php/time

...fake-hwclock
alarm-fake-hwclock designed especially for system without battery backed up RTC, it includes a systemd service which on shutdown saves the current time and on startup restores the saved time, thus avoiding strange time travel errors...
Install it with this:
Code: Select all
pacman -Sy fake-hwclock
janui
User avatar
janui
 
Posts: 243
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Pi initial Startup clock is messed up.

Postby irishwill2008 » 16 Apr 2018, 09:10

Hi guys,

Thanks for clearing that one up! Honestly, it doesnt effect me nor do i want to mess with the boot time etc just to allow times to show correctly on a service i will never be looking into but i always wanted to know why it was happening xD

I can sleep easy tonight so :D :lol:

At least thats covered for me and hopefully some other lost soul :)

Thanks!

Regards,

Will.
irishwill2008
 
Posts: 151
Joined: 26 Jul 2016, 14:49
Location: Ireland

support RuneAudio Donate with PayPal


Return to General discussion

Who is online

Users browsing this forum: No registered users and 0 guests