LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-01-2013, 06:07 AM   #1
niraj.vara
LQ Newbie
 
Registered: May 2009
Posts: 27

Rep: Reputation: 0
server date time change on every boot


HI

I have centos 5.8 everytime when I reboot the system Its time get change to MST or other zone.

then I manually do it by

cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

and its showing the IST time.

what sud i required to do solve this issue. !!!
 
Old 05-01-2013, 07:50 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by niraj.vara View Post
what sud i required to do solve this issue. !!!
Spell all your words, all the time here when you post.

I don't think cp works but I believe this will:
terminal >
Code:
mv /etc/localtime /etc/localtime.bak 
ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
and then
Code:
date
if it's correct. reboot and check it.

IF this is a virtualized host, there may be other bits we'd have to "flip" (further instructions).
If you have rebooted and it doesn't keep, then is this a virtual host?

http://www.centos.org/modules/newbb/...topic_id=12589
http://www.linuxtopia.org/online_boo...time-zone.html

Last edited by Habitual; 05-01-2013 at 07:53 AM.
 
Old 05-01-2013, 08:09 AM   #3
niraj.vara
LQ Newbie
 
Registered: May 2009
Posts: 27

Original Poster
Rep: Reputation: 0
HI

Its not a virtual system.

when I have different zone rather than IST afte reboot then I just do the following

cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

and it changed with the current IST time.
 
Old 05-01-2013, 08:12 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by niraj.vara View Post
HI

Its not a virtual system.

when I have different zone rather than IST afte reboot then I just do the following

cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

and it changed with the current IST time.
So, is it fixed or not? I'm busy.If you just
Code:
ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
you wouldn't have to cp every time you rebooted.
 
Old 05-01-2013, 12:04 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by niraj.vara View Post
HI

I have centos 5.8 everytime when I reboot the system Its time get change to MST or other zone.

then I manually do it by

cp /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

and its showing the IST time.

what sud i required to do solve this issue. !!!
is the time correct for MST after the reboot? If not then you might want to look at the CMOS battery on the motherboard. it very well could be dead or dying thus require replacement. not a hard thing to do on most systems.
 
Old 05-01-2013, 12:11 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
also check if Network Time Server is being used
on the unsupported CentOS 5.8 it is by default
-- PS. 5.8 is unsupported , time up upgrade to CentOS 5.9

set NTS to the time zone you need
 
Old 05-01-2013, 04:27 PM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by John VV View Post
also check if Network Time Server is being used
on the unsupported CentOS 5.8 it is by default
-- PS. 5.8 is unsupported , time up upgrade to CentOS 5.9

set NTS to the time zone you need
yup a simple yum -y update will resolve that issue.
 
Old 05-01-2013, 05:36 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
if you are using the 6x repo ( /6x/$basearch/os/ )a normal update( or upgrade ) will do
but if you are using the default 6.3 ( $releasever/$basearch/os/) in the yum repo line then
Code:
su -
yum releasever=6.4 upgrade
is needed
 
Old 05-01-2013, 06:37 PM   #9
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by John VV View Post
if you are using the 6x repo ( /6x/$basearch/os/ )a normal update( or upgrade ) will do
but if you are using the default 6.3 ( $releasever/$basearch/os/) in the yum repo line then
Code:
su -
yum releasever=6.4 upgrade
is needed
with the CentOS releases if they are running 5.x or 6.x just a standard yum update will bring you fully to the most current release of that version. so from 5.8 up to 5.9 without issue same goes for 6.3 up to 6.4 without issue.

there might be some issue if you are running RHEL with that type of update, but not with CentOS as it is not a 100% fork of RHEL
 
Old 05-02-2013, 09:15 AM   #10
sangfroid
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Rep: Reputation: Disabled
it must be dead cmos battery.... try replacing it ....that would be the first thing i would do
 
  


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
Log Date/time doesn't change with system time saurabhchokshi Linux - Software 5 07-07-2010 12:27 AM
C code to change date time on linux mayankparasher Programming 5 03-31-2009 10:04 PM
Change system time or date or both lel800 Linux - Newbie 6 10-28-2003 07:00 PM
how to change date and time in slackware 8.1 erikm103 Linux - Newbie 4 02-25-2003 06:26 PM
how do you change the date / time? jkane Linux - General 2 01-15-2002 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:42 PM.

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