In order to resolve a specific timezone related bug on a software project that I'm working on, I'm trying to replicate a change on the system's clock using timedatectl
to check my software behavior.
I'm trying to achieve that by running
timedatectl set-timezone America/New_York
timedatectl set-local-rtc 1
timedatectl set-ntp false
timedatectl set-time "2017-03-12 01:58:50" && hwclock -w
When I do that and run timedatectl
right after, I get the expected following time:
Local time: Sun 2017-03-12 01:58:51 EST
Universal time: Sun 2017-03-12 06:58:51 UTC
RTC time: Sun 2017-03-12 01:58:51
Time zone: America/New_York (EST, -0500)
System clock synchronized: no
systemd-timesyncd.service active: no
RTC in local TZ: yes
However, 10 seconds after this, when the minute changes (to xx:59
), the local and universal time kind of "reboot" to the current time
Local time: Wed 2019-08-07 21:01:41 EDT
Universal time: Thu 2019-08-08 01:01:41 UTC
RTC time: Sun 2017-03-12 01:58:57
Time zone: America/New_York (EDT, -0400)
System clock synchronized: no
systemd-timesyncd.service active: no
RTC in local TZ: yes
What am I missing here?
My setup is an Vagrant Ubuntu 18 VM (Linux vagrant 4.15.0-51 / vm box "bento/ubuntu-18.04").