Change the time

I want to change the time of the container to test some cases related to dates. Is it possible to change the time/date of the server/container so that I can execute these test cases on WordPress?

Hey @menakas

There isn’t a simple way of doing this with Local. Since the current release of Local makes use of Docker and containers, you might be able to log into the VirtualMachine and manually adjust the date which should update all of the containers with the new time.

I haven’t tried it myself, but in theory it should work!

Thanks Ben,
I did try logging in via ssh, but there are permission issues for changing date/time. I would appreciate it if you can take a look at this screenshot and tell me if anything can be done differently to achieve my purpose.

Thanks and cheers,
Menaka S.

Hey @menakas

I was able to get the date to be set for a little bit, but it looks like there is an auto time syncronization job that is run about every 10 seconds:

You might be able to track down and kill that process. One other option would be to make use of the latest version of Local (v5) which doesn’t rely on Docker or Virtualbox:

From there you might be able to manually update the time of the host machine in order to do the testing that you want to do.