I want to do tests with some time based applications.
I want to set the system time 3 days in the future or 5 years in the past.
CentOS 7 is not allowing me to do this.
Both commands below work, but after a few seconds the time is reset back to my current time. It's really annoying. NTP is not running. There is probably some other mechanism that is resetting the time to my current time.
- timedatectl set-time "2019-08-30 18:17:16"
- date -s '2014-12-25 12:34:56'
[root@qwerty ~]# timedatectl
Local time: Wed 2019-08-28 20:41:00 CEST
Universal time: Wed 2019-08-28 18:41:00 UTC
RTC time: Fri 2019-08-30 16:26:36
Time zone: XYZW ()
NTP enabled: no
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2019-03-31 01:59:59 CET
Sun 2019-03-31 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2019-10-27 02:59:59 CEST
Sun 2019-10-27 02:00:00 CET