LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-01-2016, 12:02 PM   #1
anon076
LQ Newbie
 
Registered: Jan 2010
Posts: 16

Rep: Reputation: Disabled
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.
 
Old 05-01-2016, 12:06 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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.
 
Old 05-01-2016, 04:46 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
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.
 
Old 05-01-2016, 04:53 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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.
 
Old 05-02-2016, 12:04 PM   #5
anon076
LQ Newbie
 
Registered: Jan 2010
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-02-2016, 12:24 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,679

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
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.
 
1 members found this post helpful.
Old 05-02-2016, 12:48 PM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Quote:
Originally Posted by linuxdistro View Post
But the hwclock shows the changed time that was set using the date utility.
This is weird, date utility should not touch the hwclock. I suspect there is some GUI applet running doing all this mess.
 
1 members found this post helpful.
Old 05-02-2016, 03:43 PM   #8
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 05-03-2016, 12:18 AM   #9
anon076
LQ Newbie
 
Registered: Jan 2010
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks guys. The workaround I have in place seems to do the job.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
changing stack size permanently. manoj.linux Linux - Enterprise 1 02-08-2013 02:01 AM
changing my mac address permanently at ubuntu jamil_2342 Linux - Newbie 2 03-16-2008 01:03 PM
Permanently Changing CDROM Permissions JMJ_coder Slackware 8 09-17-2007 07:06 PM
Changing bath PATH permanently ... angel115 Linux - General 7 09-04-2005 10:05 PM
Changing network driver permanently jvk Linux - Newbie 7 10-08-2004 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration