1

I have Mint Linux running in a VM.

I tried through the GUI to set the date to an earlier date so I could try to mimic a database issue that occurred on production on that date.

I tried to use the date command.

Both times, within a few seconds the date is changed back to today.

I stopping auto time synchronisation - the output from timedatectl status is:

    Local time: Mon 2016-04-18 15:41:19 BST
  Universal time: Mon 2016-04-18 14:41:19 UTC
        Timezone: Europe/London (BST, +0100)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2016-03-27 00:59:59 GMT
                  Sun 2016-03-27 02:00:00 BST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2016-10-30 01:59:59 BST
                  Sun 2016-10-30 01:00:00 GMT

I tried:

hwclock --set --date="2016-04-13 16:45:05"

Nothing works, the clock just keeps going back to today.

rmcsharry
  • 5,363
  • 6
  • 65
  • 108

2 Answers2

2

I feel like an idiot.

I thought it was Linux or Mint magic...stupid me forgot it is a VM, so it gets the time from the host.

I change the time on the host manually and hey presto it changed in the VM.

Doh, posting the answer just in case someone else forgets the most obvious thing too!

rmcsharry
  • 5,363
  • 6
  • 65
  • 108
0

My first suggestion would be to check if you have automatic time and date updates turned on, and if yes, to turn off that option. The same thing happened on my machine, although I use Debian.

MicSokoli
  • 841
  • 6
  • 11
  • Thanks for the fast response, but in the GUI it is set to "Manual" – rmcsharry Apr 18 '16 at 14:49
  • You might want to check out this post then: http://superuser.com/questions/982280/how-to-disable-time-synchronization-in-linux-mint You could have something else installed that is updating your time. – MicSokoli Apr 18 '16 at 14:56