3

We have a Debian server (in a VM) running a Java application on a Tomcat server, using a Postgres database. It's a testing environment, so we can do anything we want to it.

Every once in a while, we would like to test some logic that is scheduled eg. for Friday early morning. Only, we would like to do this for example on Monday evening. We want the server to completely think it's some other time than "now".

What do we need to do? Can we just turn off NTP, set the system time/time zone (and perhaps reboot)?

What are some problems we might run into? Off the top of my head, DHCP leases could fail, but we don't use DHCP here.

Edit: a friend pointed me to the question What consequences / implications can arise from a wrong system clock?. In addition to the great answers there, my question also relates to the act of changing the time on a running system.

vektor
  • 131
  • 4
  • 1
    Can't you just set up a testing VM for this purpose? – Sven Apr 20 '16 at 07:54
  • By "server" I mean a VM on a physical server. Good point, question updated. – vektor Apr 20 '16 at 08:54
  • try to find a syscall hooking thing, I suggest. – Jiang YD Apr 20 '16 at 09:24
  • @vektor: My point is: Doing this on a production machine is a bad idea. Set up a separate VM with a testing environment and do the testing there. – Sven Apr 20 '16 at 09:34
  • 1
    @Sven and yet again, you are correct. Of course, the machine is only used for testing purposes. Question edited. Now. What happens if I start fiddling with the system time? :) – vektor Apr 20 '16 at 10:02

0 Answers0