Changing date permanently
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.
|
What version of Red Hat are you running?
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. |
hwclock is the same as the BIOS clock.
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. |
Quote:
|
Also check that chrony isn't running. chrony is somehow installed and running as a service on Fedora 23, and I don't recall installing it myself
|
Thanks guys. The workaround I have in place seems to do the job.
|
All times are GMT -5. The time now is 07:29 AM. |