Sorry I wasn't clear. $^T is along the lines of what I'm
looking for, but I also already thought of this. What I
want is to make all time calls transparently return
times relative to some known starting point rather than the
current time; i.e., make it look like the script is running
in the past or future. If $^T were also used as some
sort of relative base time, that seems like it could work.
But it's not used that way so time() and other calls
return the true time.
I'd have two uses for something like this:
- Testing date/time interfaces;
- Forcing certain scripts to run "back in time" for the
purposes of creating specific time stamped files, or
whatever.
I understand the dangers and tradeoffs of doing this. I
just wanted to know if it was possible. Setting a local
$^T value is along the lines of what I was
looking for, only with more widespread effect.
| [reply] |