Closed mpvader closed 7 years ago
And found the cause (thanks @jhofstee), see: https://github.com/victronenergy/openembedded-core/blob/danny_venus/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh#L65
fix is underway: test will be done by setting clock forward instead of backward.
Also, after setting the current date/time as the last step, I'll add a call to initscripts/save-rtc.sh.
Tests were done on a beagleboneblack, not connected to internet / ntp.
After setting the hwclock to some time in the past, the time is miraculously restored again during boot.
Which is normally not such a big issue, ie. why would someone want to set the hwclock many years back?, but it is now: setting the hwclock and then powering the device down for a few seconds before starting it up again is part of the rtc & backup battery test.
A few things I noticed in below log.
1) the hwclock is restoring the correct time:
2) somewhere at the end, the wrong time shows up again:
This 2016-10-24 is the time the system had before setting it back to 2003-1-1.
Full log: