- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- static date
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 03:21 AM
08-19-2005 03:21 AM
Our client wants to set a server to a static date for the duration of a project. For instance if the date is October 1, 2005, they want the date to remain October 1, 2005 till the project has been completed.
Can we schedule a cron job to run daily at 12:00 am, like "date -u 10010000"? Is it going to work because of setting time backwards?
Thanks,
Elena.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 03:27 AM
08-19-2005 03:27 AM
Re: static date
Moving the time backwards will cause large troubles (as in corruption / invalid data) for online databases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 03:29 AM
08-19-2005 03:29 AM
Re: static date
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 03:35 AM
08-19-2005 03:35 AM
Re: static date
If you really want to do this, shutdown all databases and applications. Just setting a cron job will cause more troubles.
Databases will complain about duplicate dates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 03:36 AM
08-19-2005 03:36 AM
Re: static date
What is the purpose of this?
Why don't you create a fake "date" command that allways returns the same date? Would that be enough?
Enjoy :)
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 04:01 AM
08-19-2005 04:01 AM
Re: static date
This is for testing the upcoming project of Archive/Purge. The necessity is due to the program running based on months to purge in the program.
I am not sure they can take Oracle down ...if not I guess it is impossible to keep server at a certain date.
Pedro, can you explain more about a fake date?
Elena.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 04:10 AM
08-19-2005 04:10 AM
Re: static date
mv /sbin/date /sbin.date.old
mv /usr/bin/date /usr/bin/date.old
echo "echo \"Sat Oct 1 00:00:01 PDT 2005\"" > /sbin/date
echo "echo \"Sat Oct 1 00:00:01 PDT 2005\"" > /usr/bin/date
chmod 555 /sbin/date /usr/bin/date
but this will only help to those programs, querying the the date by the date command, the system calls will still return the actual system date. And most large commercial programs, like databses, get the info via system calls.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 04:21 AM
08-19-2005 04:21 AM
Re: static date
Mel already answered :)
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 04:23 AM
08-19-2005 04:23 AM
SolutionSo, you will have a process running in the background all the time, sleeping less than 59 seconds and setting the date to the same value over and over until the cows come home :), something like this
while true
do
UNIX95= date 10010000
sleep 55
done
if you omit UNIX95=, when you set the time backwards, it will ask you if you are sure or not and you have to answer yes to that, in XPG4, question is not asked.
So, this might be something that you can use but again, check with a DBA for record timekeeping granularity first.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 04:49 AM
08-19-2005 04:49 AM
Re: static date
Do you need archiving for recovery while the purge is going on? If not, then you may not have to worry. You could turn off archive logs before the purge begins, do a cold backup, run the purge, and then restart archive logs, then do a cold backup again before starting up in regular mode. In a big purge, this *might* actually be a faster process anyways.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2005 11:05 AM
08-19-2005 11:05 AM
Re: static date
Bill Hassell, sysadmin