[systemd-devel] use RTC date/time to set system date time

Michał Zegan webczat_200 at poczta.onet.pl
Mon Mar 1 14:38:46 UTC 2021


There are problems with log timestamps when you do that, and it is
probably why it was not done.
I am wondering if the only correct way isn't to do it in initramfs (if
it's systemd) before starting the journald, so that first saved logs
have correct timestamps?

W dniu 01.03.2021 o 15:28, Kevin P. Fleming pisze:
> It's fairly simple to add a one-shot service unit to use 'hwclock' to
> read from the RTC and set the kernel's real-time clock. I do this on
> my RPis which use modules for their RTCs.
> 
> On Mon, Mar 1, 2021 at 9:02 AM Michał Zegan <webczat_200 at poczta.onet.pl> wrote:
>>
>> Someone should really find a way to make it cooperate well with modular
>> rtcs.
>> It's popping up over and over and over and over again and no one is/will
>> build all rtc drivers into the kernel.
>>
>> W dniu 01.03.2021 o 13:04, Mantas Mikulėnas pisze:
>>> Normally I think systemd expects the kernel to do this on its own.
>>>
>>> On Mon, Mar 1, 2021, 12:31 Belisko Marek <marek.belisko at gmail.com
>>> <mailto:marek.belisko at gmail.com>> wrote:
>>>
>>>     Hi,
>>>
>>>     I have a case when a board boots without network connection but RTC
>>>     have the correct date/time. Does systemd use RTC date/time to set
>>>     systemd time or it needs to be done manually?
>>>
>>>     Thanks and regards,
>>>
>>>     marek
>>>
>>>     --
>>>     as simple and primitive as possible
>>>     -------------------------------------------------
>>>     Marek Belisko - OPEN-NANDRA
>>>     Freelance Developer
>>>
>>>     Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>>>     Tel: +421 915 052 184
>>>     skype: marekwhite
>>>     twitter: #opennandra
>>>     web: http://open-nandra.com <http://open-nandra.com>
>>>     _______________________________________________
>>>     systemd-devel mailing list
>>>     systemd-devel at lists.freedesktop.org
>>>     <mailto:systemd-devel at lists.freedesktop.org>
>>>     https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>     <https://lists.freedesktop.org/mailman/listinfo/systemd-devel>
>>>
>>>
>>> _______________________________________________
>>> systemd-devel mailing list
>>> systemd-devel at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>
>>
>> _______________________________________________
>> systemd-devel mailing list
>> systemd-devel at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210301/55855189/attachment.sig>


More information about the systemd-devel mailing list