faketime (1)Table of Contents
The given command will be tricked into believing that the current system time is the one specified in the timestamp. The wall clock will continue to run from this date and time unless specified otherwise (see advanced options). Actually, faketime is a simple wrapper for libfaketime, which uses the LD_PRELOAD mechanism to load a small library which intercepts system calls to functions such as time(2) and fstat(2) . This wrapper exposes only a subset of libfaketime’s functionality; please refer to the README file that came with faketime for more details and advanced options.
- show usage information and quit.
- show version information and quit.
- use the multi-threading variant of libfaketime.
- use the advanced timestamp specification format.
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’ (Please note that it depends on your locale settings whether . or , has to be used for fractional offsets)
- Freeze clock at absolute timestamp: "YYYY-MM-DD hh:mm:ss"
- If you want to specify an absolute point in time, exactly this format must be used. Please note that freezing the clock is usually not what you want and may break the application. Only use if you know what you’re doing!
- Relative time offset: "[+/-]123[m/h/d/y], e.g. "+60m", "+2y"
- This is the most often used format and specifies the faked time relatively to the current real time. The first character of the format string must be a + or a -. The numeric value by default represents seconds, but the modifiers m, h, d, and y can be used to specify minutes, hours, days, or years, respectively. For example, "-2y" means "two years ago". Fractional time offsets can be used, e.g. "+2,5y", which means "two and a half years in the future". Please note that the fraction delimiter depends on your locale settings, so if "+2,5y" does not work, you might want to try "+2.5y".
- Start-at timestamps: "@YYYY-MM-DD hh:mm:ss"
- The wall clock will start counting at the given timestamp for the program. This can be used for specifying absolute timestamps without freezing the clock.
Faking times for multiple programs or even system-wide can be simplified by using ~/.faketimerc files and /etc/faketimerc. Please refer to the README that came with faketime for warnings and details.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You may redistribute copies of faketime under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
- Advanced Timestamp Format
- Advanced Usage
- Reporting Bugs
- See Also
- tlp_WithParameter (3)
- EET_T_CHAR (3)
- tlp_ViewPluginsManager (3)
- update-dpsyco-cfengine (1)
- scr_dump (3)
- Namespace_std (3)
- fstatvfs (3)
- Syntax::Highlight::Engine::Kate::Scilab (3pm)
- Dict.keys_1 (3kaya)
- Template::Plugin::XML::File (3pm)
- PDL::IO::FlexRaw (3pm)
- ldns_getaddrinfo (3)
- console (1)
- pybabelfishd (1)
- XML::LibXML::Iterator (3)
- pushbuttonscreenshots (3)
- TLS.verifyCertificate (3kaya)
- glRasterPos3dv (3x)
- Moose::Meta::Method::Overridden (3pm)
- xfskin (1)