LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   server date time change on every boot (https://www.linuxquestions.org/questions/linux-server-73/server-date-time-change-on-every-boot-4175460267/)

niraj.vara 05-01-2013 06:07 AM

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. !!!

Habitual 05-01-2013 07:50 AM

Quote:

Originally Posted by niraj.vara (Post 4942513)
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

niraj.vara 05-01-2013 08:09 AM

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.

Habitual 05-01-2013 08:12 AM

Quote:

Originally Posted by niraj.vara (Post 4942582)
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.

lleb 05-01-2013 12:04 PM

Quote:

Originally Posted by niraj.vara (Post 4942513)
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.

John VV 05-01-2013 12:11 PM

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

lleb 05-01-2013 04:27 PM

Quote:

Originally Posted by John VV (Post 4942780)
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.

John VV 05-01-2013 05:36 PM

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

lleb 05-01-2013 06:37 PM

Quote:

Originally Posted by John VV (Post 4942970)
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

sangfroid 05-02-2013 09:15 AM

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


All times are GMT -5. The time now is 08:23 AM.