×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

More RTC madness!!!!

  • Posts: 294
  • Thank you received: 54

Replied by Gilles Gagnon on topic More RTC madness!!!!

Thanks for the info Radek.

I'll add "hwclock -s" to rc.local and see if it fixes it when I get back home. Hope its "as simple as that", and that the solution can work for Brian and others.

Gilles
5 years 2 months ago #34171

Please Log in or Create an account to join the conversation.

  • Posts: 294
  • Thank you received: 54

Replied by Gilles Gagnon on topic More RTC madness!!!!

Just as a follow-up, adding hwclock -s to /etc/rc.local worked! The system clock is now set correctly when the system boots.

Thanks again.

Gilles
5 years 2 months ago #34229

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 0

Replied by Brian Holbrook on topic More RTC madness!!!!

Still no joy for me

If i type date; sudo hwclock -r i get both times simulaneoulsy but in different formats??

Fri Feb 12 02:30:01 AEST 2016
Fri 12 Feb 2016 02:30:02 AEST .125778 seconds

Do you think this could be the issue somehow? I also cannot find the Internationalisation Options in raspi-config???

Cheers
Bri
5 years 2 months ago #34233

Please Log in or Create an account to join the conversation.

  • Posts: 294
  • Thank you received: 54

Replied by Gilles Gagnon on topic More RTC madness!!!!

Hello Brian,

When I issue "date; sudo hwclock -r" I get an output similar to yours. I don't have any Internationalisation Options in raspi-config either.

Have you tried adding "hwclock -s" in /etc/rc.local, before the "exit 0" line? It solved the problem for me.

Good luck.

Gilles
5 years 2 months ago #34237

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4

Replied by Andres Rossi on topic More RTC madness!!!!

681/5000
I'm having problems with my RTC too. I bought a ds3231 and I can not do system synchronization with RTC.
I tried everything, every tutorial you share on these topics and nothing.

Now my RTC keeps the time correctly, but I can not synchronize with the system, even if I use hwclock -s in the rc.local file. In fact, I think that by adding the two lines to the rc.local file, this cause stops working rc.local or something like that since the VAP stopped working after that (there is a line of code to activate the VAP in rc. local).

The only way to synchronize RTC with the system time is by typing sudo hwclock -s in the terminal: /

Any suggestions?
Thank you
5 years 1 month ago #34880

Please Log in or Create an account to join the conversation.

  • Posts: 294
  • Thank you received: 54

Replied by Gilles Gagnon on topic More RTC madness!!!!

Thanks for reviving this thread. You made me realize that my suggestion (in #34237) of putting "hwclock -s" in rc.local was not quite correct; sorry for that.

In my case, what worked was to put "/sbin/hwclock --hctosys" in rc.local (before the "exit 0"), not "hwclock -s" as mentionned in my previous post. "--hctosys" will set the system time and date with the time/date from the hardware clock.

Sorry for the confusion, must have been my winter cold :-/ !
5 years 1 month ago #34881

Please Log in or Create an account to join the conversation.

  • Posts: 1309
  • Thank you received: 226

Replied by Andrew on topic More RTC madness!!!!

You may need to put '&' at the end of the command in RC.local for it to continue properly.
hwclock -s &
The following user(s) said Thank You: Andres Rossi
5 years 1 month ago #34884

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375

Replied by Radek Kaczorek on topic More RTC madness!!!!

Documentation says these are equivalent:
-s, --hctosys
              Set the System Clock from the Hardware Clock
5 years 1 month ago #34908

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4

Replied by Andres Rossi on topic More RTC madness!!!!

That's it!!! Just adding '&' at the end of the hwclock -s makes work it!
Thank you
5 years 1 month ago #34921

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0

Replied by Freddy on topic More RTC madness!!!!

Can you explain where exactly do you place this command?
5 years 3 weeks ago #35798

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375

Replied by Radek Kaczorek on topic More RTC madness!!!!

You add it to /etc/rc.local just above the line that says "exit 0"
Last edit: 5 years 3 weeks ago by Radek Kaczorek.
5 years 3 weeks ago #35803

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 0

Replied by Freddy on topic More RTC madness!!!!

Thanks Radek, I will add that once I receive my RTC.
5 years 3 weeks ago #35808

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 0.698 seconds