How to temporary adjust date/time in Linux shell
I want to write some testscripts that create some files and execute commands that change behaviour depending on the current date. For testing purposes I would like to change the time to different dates (in the past and future) and check the behaviour.
Is it possible to change the date exclusively just for a singe shell-session, or fool a single application about the current dat开发者_如何转开发e? - how could this be done?
this can be done to a program with libfaketime which is preload library i.e. LD_PRELOAD
.
精彩评论