2

I need to do some testing that involves setting the clock into the future, and I can't see how to disable ntp syncing with timedatectl or anything else so I can change the clock and not have it sync to real time.

This is ubuntu 16.04

0
2

Just stop and disable both systemd-timesyncd (installed by default) and ntp (if you have installed it). Better take a backup before moving the system into the future, because interesting things may happen when you will bring it back into the past.

sudo systemctl stop systemd-timesyncd && sudo systemctl disable systemd-timesyncd
sudo systemctl stop ntp && sudo systemctl disable ntp

If the system is a virtual machine you must also make sure that it is not set to synchronize its time with the host.

Not the answer you're looking for? Browse other questions tagged or ask your own question.