Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #229735

Re: setting the date for testing

From "hdv@gmail" <hdv.jadev@gmail.com>
Newsgroups linux.debian.user
Subject Re: setting the date for testing
Date 2020-12-13 15:10 +0100
Message-ID <BlAeu-80O-9@gated-at.bofh.it> (permalink)
References <Bj98K-6W2-3@gated-at.bofh.it> <BjjB7-52L-5@gated-at.bofh.it> <BlzLs-7B3-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?
> 
> Thanks!
> 
> 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>

HTH

Grx HdV

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

setting the date for testing Michael Grant <mgrant@grant.org> - 2020-12-06 21:50 +0100
  Re: setting the date for testing "hdv@gmail" <hdv.jadev@gmail.com> - 2020-12-06 22:00 +0100
  Re: setting the date for testing "hdv@gmail" <hdv.jadev@gmail.com> - 2020-12-07 09:00 +0100
    RE: setting the date for testing Michael Grant <mgrant@grant.org> - 2020-12-13 14:40 +0100
      Re: setting the date for testing "hdv@gmail" <hdv.jadev@gmail.com> - 2020-12-13 15:10 +0100
        Re: setting the date for testing Michael Grant <mgrant@grant.org> - 2020-12-13 16:40 +0100
          Re: setting the date for testing "hdv@gmail" <hdv.jadev@gmail.com> - 2020-12-13 17:00 +0100
  Re: setting the date for testing Michael Stone <mstone@debian.org> - 2020-12-07 15:30 +0100

csiph-web