Linux: how to set the time zone of a process?

I need to set the time intervals of individual processes running in a linux window. I tried to set the TZ variable (in the local context), but it did not work.
Is there a way to launch an application from the command line with a different system date to the system date? This may sound silly, but I need a sandbox in which the system date will be changed.
Launching a virtual window is not an option;)

+3
source share
2 answers

You might want to try something similar to dateshift or libfaketime , both of which allow you to run the program with an offset time.

+3
source

What program are you using? TZ setup here:

turboj@linux:~> date
Do 2. Sep 11:59:26 CEST 2010
turboj@linux:~> export TZ=UTC
turboj@linux:~> date
Do 2. Sep 09:59:34 UTC 2010

Did you forget to "export"?

+2
source

Source: https://habr.com/ru/post/1762811/


All Articles