Please note that RTC time and system time are different. If you set RTC time it won’t affect system time and vice versa. However, they are synchronized.
you can refer to the dedicated article on legato.io explaining the difference: Set User Timebase - Legato Docs
you can also refer to the following post which gives an example of command line to set the system time using NTP service and then set RTC based on the system time: