[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setting the date for testing

On 2020-12-13 14:36, Michael Grant wrote:
This did not work:

# timedatectl set-ntp true

Failed to set ntp: NTP not supported

# timedatectl set-ntp false

Failed to set ntp: NTP not supported

Other ideas?

I am trying to set the date manually so that I can test the system set at future dates.  Setting the system using the date command, it just resets itself back to the current date/time after a few seconds.  How can I stop this?


Michael Grant

*From: *hdv@gmail <mailto:hdv.jadev@gmail.com>
*Sent: *07 December 2020 07:53
*To: *debian-user@lists.debian.org <mailto:debian-user@lists.debian.org>
*Subject: *Re: setting the date for testing

On 2020-12-06 21:56, hdv@gmail wrote:

 > # timedatectl set-ntp true

I am sorry for the typo. This should of course have been "false"!

Grx HdV

Could it be that you have systemd-timesyncd running?

BTW, this is what I do to manually/explicitly set the system time (taken verbatim from my vimwiki, so don't mind the wording):

Changing the Current Date:

# timedatectl set-time <YYYY-MM-DD>

Or both at once:

# timedatectl set-time <YYYY-MM-DD> <HH:MM:SS>

This commands will fail if an NTP service is enabled. The NTP service can be enabled and disabled using a command as follows:

# timedatectl set-ntp <true|false>

Changes to the status of chrony or ntpd will not be immediately noticed by timedatectl. If changes to the configuration or status of these tools are made, enter the following command:

# systemctl restart systemd-timedated.service

By default, the system is configured to use UTC. To configure your system to maintain the clock in the local time, run the timedatectl command with the set-local-rtc option as root:

# timedatectl set-local-rtc <boolean>


Grx HdV

Reply to: