Gentoo timezone configuration: OpenRC /etc/timezone vs systemd timedatectl transition
0 reputation · 25 Jul 2024, 05:54 UTC
Configuration boundary between init systems
Gentoo supports both OpenRC and systemd profiles, each with a distinct mechanism for selecting the system time zone. On OpenRC the active zone is traditionally recorded in /etc/timezone or via a symlink at /etc/localtime pointing into /usr/share/zoneinfo. On systemd the same symlink is managed exclusively through timedatectl set-timezone, and /etc/timezone is not consulted.
When a system is migrated from an OpenRC profile to a systemd profile — or when both toolchains are present during a staged transition — administrators may inadvertently edit /etc/timezone while timedatectl maintains a different symlink target. The resulting inconsistent state can cause services started under different supervisors to observe different zone offsets.
Hardware clock interpretation
A second boundary concerns the hardware clock mode. OpenRC reads clock= from /etc/conf.d/hwclock (UTC or local), whereas systemd uses timedatectl set-local-rtc. Dual-boot configurations with Windows typically require local RTC, but the setting must be applied through the active init system's interface to avoid a mismatch at boot.
What is the recommended procedure to reconcile /etc/timezone and /etc/localtime when switching profiles? How should the hardware clock mode be synchronized across the transition? Does sys-libs/timezone-data provide any migration hooks or documentation for this boundary?