How to set a static system date for one user or application--"Groundhog Day"

Posted by aixylinux on Stack Overflow See other posts from Stack Overflow or by aixylinux
Published on 2010-05-28T17:29:44Z Indexed on 2010/05/28 17:31 UTC
Read the original article Hit count: 206

Filed under:
|
|

I have a vendor application on AIX which requires the system date to be set to an arbitrary value for QA testing purposes. The application gets its date from the system, and there is no possibility of changing it to get the date from a parameter. The application runs under a specific userid. I'd like to find a way to set the date for this application or user to a private value without affecting all the other users and applications on the system. So far the only thing I have been able to do is dedicate an LPAR to this application. Every day at midnight a root crontab job resets the date to the static value. This works, but it is wasteful of resources; and now I am faced the requirement to do this for other applications, which, of course, require different dates. Is there any clever solution to this? I need a way to create a sandboxed environment where the date returned from the system can be set to a private value. As I said, the OS is AIX, and that can't be changed for this application either.

© Stack Overflow or respective owner

Related posts about date

Related posts about private