libfaketime intercepts various system calls that programs use to retrieve the current date and time. It then reports modified (faked) dates and times (as specified by the user) to these programs. This means you can modify the system time a program sees without having to change the time system-wide.
Homepage
Download
Recent Releases
0.9.1009 Feb 2024 12:43
major feature:
- automatically try to decide about FORCE_MONOTONIC_FIX at run-time when not set as a compile-time flag
- improved macOS Monterey support through dyld interposing
- changed interception hooks for stat() and similar functions, refactored to use a common handler (@sirainen)
- added support for timespec_get, timerfd_ get,set (@sliquister)
- generic syscall() interception for selected syscalls (@dkg)
- improved testing system (@dkg)
0.9.921 Feb 2021 17:38
major feature:
- FAKE_RANDOM flag enables deterministic return values for getrandom(), e.g., for testing cryptographic implementations
- new environment variable FAKETIME_TIMESTAMP_FILE to externally track a process' fake time
- FAKE_SETTIME flag enables the interception of system calls such as clock_settime() and settimeofday()
- various bugfixes
0.9.827 Aug 2019 07:30
minor feature:
- Support for unknown clock ids
- Fixes for recent glibc, gcc8, jemalloc
- Improved file stat() faking
- New features FAKETIME_FOLLOW_FILE, FAKETIME_XRESET and FAKETIME_DONT_RESET
- Intercept also clock_nanosleep(), epoll_wait(), epoll_pwait(), and pselect()
- Compile-time flag FORCE_MONOTONIC_FIX for platforms that otherwise hang on monotonic clock use
0.9.714 Nov 2017 19:53
minor feature:
-added an option to disable monotonic time faking
- added support for COARSE clocks
- Preliminary support for CLOCK_BOOTTIME (Linux)
- Fixed compilation on macOS (High) Sierra and various compiler warnings
- Support for select() call added
- Updated documentation