Closed RCoeurjoly closed 9 months ago
did you enable INTERCEPT_SYSCALL
in libfaketime's src/Makefile
? As in #176, the problem is not reproducible, e.g., on Debian 12.4, so maybe the solution over there might also work on your system. If it does not, more information on your target system and the used libraries would be needed.
enabling INTERCEPT_SYSCALL I get a good result with FAKETIME, but not with FAKETIME_TIMESTAMP_FILE. I will close this issue and open another one. Thanks!
Closed.
I am having the same problem as #176. I have tried with several versions of libfaketime:
It fails in to catch the fake time with all three.
I am using the following command:
LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 FAKETIME="2020-12-24 20:30:00" .test_faketime
The code is:
`#include
include
int main() { const auto today = std::chrono::system_clock::now(); const time_t tt = std::chrono::system_clock::to_time_t( today ); std::cout << "now: " << ctime(&tt) << std::endl; return 0; }`