Run script under faketime

In Linux, there is this nice little command line tool called "faketime" (see, e.g., It let's you run a program with a different system time, so, e.g.

faketime '2008-12-24 08:15:42' python

starts, but for the script the current time is the one given as a parameter. After the start, the time progresses as normal, so this is perfect for testing code that depends on the actual time.

Is it possible to run a script within PyCharm like that? How?

1 comment

You can try using external tools, calling `faketime` as a program, and passing `python <script_name>` as arguments using macro...

But no guarantees, unfortunately


Please sign in to leave a comment.