Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way to change the date permanently that's different than the actual date?
I need to change the date and the system needs to keep the changed date during the testing period.
I tried changing the month for testing but it eventually changes back to the current month on its own. The ntpd is off.
Linux does not do it, but the desktop environment you are running on Linux may. (Another reason not to run bloated DE's.) It probably runs hwclock utility and gets the time from BIOS. Workaround - change BIOS time.
How long is the testing period? Is the computer running continuously? Do you need to keep the month and day the same?
Do you know how long it will take before the date jumps back? I am not aware that the BIOS clock is read other then at boot up.
You can test it, after setting clock with date utility follow up with hwclock -w and see if it still acts up. If it does there may be some reason ntpdate is run.
Is the hwclock the same as the BIOS clock?
After changing the date using the date utility, after about 30 minutes, it changes back to the current time.
ntpd is not running.
But the hwclock shows the changed time that was set using the date utility.
So I just have it sync with hwclock and it keeps the changed time.
The RedHat version is 5.11. It's on continuously. I just need to have the month set to the previous month.
There could be some cron job setup as root or system that sets time using ntpdate. There are other methods to update time like rdate but doubt they are being used.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.