Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    hwclock works in normal devices that have RTC - it writes and reads from it. There are iOT devices without an RTC. Commented Feb 26, 2019 at 16:35
  • I assume you are referring to the Raspberry Pi case, where a fairly advanced embedded device lacks a hardware clock capable of RTC. Raspberry Pi is a example of an outlier, because it tries to offer an enormous range of capabilities at as low of a price as possible, hence they chose to save money by forgoing a built-in battery powering one tiny IC capable of RTC. Commented Feb 26, 2019 at 16:44
  • 1
    The rpi suffers from it, but it is not alone, unfortunately. Commented Feb 26, 2019 at 16:46
  • Unfortunately the we are using the BusyBox 1.24.1 hwclock which as far as I can tell can only write to and from the system time. Writing directly to hwclock would be ideal but doesn't seem to be available to me: BusyBox v1.24.1 (2018-11-14 12:40:41 PST) multi-call binary. Usage: hwclock [-r|--show] [-s|--hctosys] [-w|--systohc] [-t|--systz] [-l|--localtime] [-u|--utc] [-f|--rtc FILE] Commented Feb 26, 2019 at 17:07
  • Here is the hwclock implementation. I believe the -f option just allows us to point hwclock to a specific rtc. Commented Feb 26, 2019 at 17:24