OK, I got this to work with OpenRC like this:
1) Edited /etc/conf.d/hwclock:
# Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as
# Greenwich Mean Time). If that clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".
clock="local"
#clock="UTC"
# If you want the hwclock script to set the system time (software clock)
# to match the current hardware clock during bootup, leave this
# commented out.
# However, you can set this to "NO" if you are running a modern kernel
# and using NTP to synchronize your system clock.
#clock_hctosys="YES"
# If you do not want to set the hardware clock to the current system
# time (software clock) during shutdown, set this to no.
#clock_systohc="YES"
# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here. Alpha users may wish to use --arc or --srm here.
clock_args=""
2) Added hwclock sercice to boot runlevel:
$ sudo rc-update add hwclock boot
Then I shut down, went into the BIOS when I restarted and set the clock in the BIOS menu to localtime. And it has worked, I can boot and shutdown with or without a network connection and the time stays like that.
But it is confusing because in /etc/conf.d/hwclock it says:
# However, you can set this to "NO" if you are running a modern kernel
# and using NTP to synchronize your system clock.
#clock_hctosys="YES"
And on the Gentoo wiki it says:
OpenRC
When using OpenRC the hwclock init script can set the system clock on boot and sync system time to the hardware clock on shutdown. The service is enabled by default and should be disabled in favor of the above mentioned in-kernel method. The hwclock script should not be run when using the kernel's real time clock.
But that information is WRONG if you want to use localtime, as the hwclock man page explains:
The first userspace command to set the System Clock informs the kernel what timescale the Hardware Clock is using. This happens via the persistent_clock_is_local
kernel variable. If --hctosys or --systz is the first, it will set this variable according to the adjtime file or the appropriate command-line argument.
You have to send a set command with hwclock of some sort to set the kernel variable so when you use localtime you can't just rely on the kernel. That advice must have been written by people who only used UTC.
I don't have any /etc/adjtime file incidentally. Now you just need to figure out how to do that in Runit