faketime --version (return code: 0)
faketime: Version 0.9.6
For usage information please use 'faketime --help'.
faketime --help (return code: 0)
Usage: faketime [switches] <timestamp> <program with arguments>
This will run the specified 'program' with the given 'arguments'.
The program will be tricked into seeing the given 'timestamp' as its starting date and time.
The clock will continue to run from this timestamp. Please see the manpage (man faketime)
for advanced options, such as stopping the wall clock and make it run faster or slower.
The optional switches are:
-m : Use the multi-threaded version of libfaketime
-f : Use the advanced timestamp specification format (see manpage)
Examples:
faketime 'last friday 5 pm' /bin/date
faketime '2008-12-24 08:15:42' /bin/date
faketime -f '+2,5y x10,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done'
faketime -f '+2,5y x0,50' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done'
faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do date; sleep 1 ; done'
In this single case all spawned processes will use the same global clock
without restaring it at the start of each process.
(Please note that it depends on your locale settings whether . or , has to be used for fractions)