There's a well-known libfaketime library, that can forge the current system time.
https://github.com/wolfcw/libfaketime
Here's my friend's LD_PRELOAD hack, it pushes the idea further: hooking gettimeofday() to make a program to think that the time goes faster or slower. Useful for testing.