I have a testing requirement in a java application which needs to alter the system date to a couple of days ahead of current date. I am thinking of implementing a dynamic library that replaces necessary system calls,like calls to time() or gettimeofday(), and link it or load it in the jvm with LD_LIBRARY_PRELOAD environment variable, so that i didn't change the operating system time and instead just change the time through this alternate installation without impacting OS. It would be really helpful if someone can share the details of a similar implementation or help me in creating the shared library. I am using RHEL 4 with tomcat 5.5 on jdk 6.