Operating System - HP-UX
1821868 Members
3385 Online
109638 Solutions
New Discussion юеВ

system clock manipulation

 
Michael Murphy_2
Frequent Advisor

system clock manipulation

Folks,
We have an application that wants to move around the system clock to check some code - not hours but months/years. We have other users on the system that would not be amused. Is there any way to use something like EDT settings to have certain users be able to be on a drastically different time that others? Any other way to do this? Many thanks...
2 REPLIES 2
Mel Burslan
Honored Contributor

Re: system clock manipulation

short of virtualization, there is no way to set the time differently for a group of users. Time and timezone are system-wide settings and can not be altered per user basis to the best that I know.
________________________________
UNIX because I majored in cryptology...
A. Clay Stephenson
Acclaimed Contributor

Re: system clock manipulation

No, this is what sandboxes are for. However, your developers should be able to create a wrapper function for the time() system call so that if an environment variable (e.g. export TESTTIME=1989300200) is found, that value is used as epoch seconds otherwise time() is called normally.
If it ain't broke, I can fix that.