I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux.
I need to black-box test how a program behaves at different dates, and modifying the system-wide date can have unwanted side effects (cron jobs, messed up logs, etc).
Any ideas ?
Best Answer
You can just use executable
faketime
(from ubuntu repositoriessudo apt-get install faketime
) by:Or even fake time in whole shell by