I already know about faketime and datefudge, but is there a way to set this up transparently for any process that's being run as a certain user (identified by a specific UID)?
Since you have the entire source code to Linux, you can set this up exactly as you want, but you'll have to modify the system kernel and rebuild it to make it so. It isn't easy to set this up based on a UID.
If you only want to arrange that a logged in user has this property for
most commands they execute, give them a login shell that uses
to set the environment variable and then call their real shell.
You can get a taste for how this looks by doing it interactively:
$ date Mon Oct 14 14:02:05 EDT 2013 $ faketime yesterday bash $ date Sun Oct 13 14:02:10 EDT 2013 $ exit $ date Mon Oct 14 14:02:15 EDT 2013
A special login shell should also work for
cron jobs that use the user's login shell.
Of course this fakery fails for any program that sets or ignores its
$ faketime yesterday bash $ date Sun Oct 13 14:02:20 EDT 2013 $ env -i /bin/date Mon Oct 14 14:02:25 EDT 2013