Since timedatectl
can’t be used, in order to change NixOS system time manually, there are two ways I found.
- Use
hwclock --date "1970-01-01" --set
then sync with system clockhwclock -s
. - Use
date -s "1970-01-01"
But, both of the command must be executed after disable systemd-timesyncd.service
.
sudo systemctl stop systemd-timesyncd.service
I found it nowhere in the Internet that works, so I made this notes anyone looking for it in the future (myself?).