this branch should fix #9364, that is we may be currently modifying
the hardware clock on shutdown. I've tried (not very hard) for a week
to test this on bare metal but failed to find appropriate hardware.
It should be easy for the reviewer, thanks to the details on the
ticket, to test if the bug is indeed a real one, and if the fix does
correct it... and they would have to do it anyway, right? :)