LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2015, 12:27 PM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 505

Rep: Reputation: 37
centos 6: clcok is out by an hour


I've been trawling google for ages on this but nothing works. I'm in the uk, I'm running a vps as root and the system clock is one hour behind and I can't work out how to correct this. I ran tzselect and selected europe/britain, I also ran ntpdate but I got:
Code:
11 Jul 16:25:08 ntpdate[3329]: step-systime: Operation not permitted
.
can some tell me please how to put this right?

Last edited by tonj; 07-11-2015 at 05:35 PM.
 
Old 07-11-2015, 01:08 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137Reputation: 2137
What version of CentOS 6 are you running? Do you have any DST settings selected? Did you run ntpdate as root or a regular user? Is your system's UT time off, or just the local time (date -u vs date)?
 
Old 07-11-2015, 01:39 PM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,534

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Also, is the system in the UK too?
 
Old 07-11-2015, 05:10 PM   #4
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
I'm running centos 6.6 64bit. I should have mentioned this is a command line only server so there's no gui to select anything. I do everything as root. The system is in the US.
 
Old 07-11-2015, 05:20 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,534

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
What does timedatectl show?
 
Old 07-11-2015, 05:28 PM   #6
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
# timedatectl
-bash: timedatectl: command not found
 
Old 07-11-2015, 05:33 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,534

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Sorry, not sure how else to gather data. It is an easy guess that, for whatever reason, your system doesn't know it's BST but without knowing what the system clock is actually set to it's difficult to be sure.
 
Old 07-11-2015, 05:35 PM   #8
tonj
Member
 
Registered: Sep 2008
Posts: 505

Original Poster
Rep: Reputation: 37
Solved:

I solved it with the following steps. I discovered my vps provider blocks all ntp packets due to attacks however they do provide their own ntp server for their machines and they gave me the ip.

nano /etc/sysconfig/clock
contents:
Code:
ZONE="Europe/London"
UTC=true
ln -snf /usr/share/zoneinfo/GB /etc/localtime
nano /etc/ntp.conf
in /etc/ntp.conf I entered the ip my provider gave
/etc/init.d/ntpd restart

clock is now correct.
and thankyou for your responses 273

Last edited by tonj; 07-11-2015 at 05:36 PM.
 
Old 07-11-2015, 05:37 PM   #9
Aia
Member
 
Registered: Jun 2006
Posts: 66

Rep: Reputation: 21
Irrelevant now, since you found the solution before I posted.

Last edited by Aia; 07-11-2015 at 05:38 PM.
 
Old 07-11-2015, 06:00 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,534

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Glad you got it solved, but puzzled as to the initial cause.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
After installing Samba Active Directory Domain Controller, centos took 1 hour to boot yerunkar11 Linux - Server 1 04-10-2015 06:47 AM
Cron job issue - every hour works, but specific hour fails lunarleviathan Linux - Newbie 6 11-20-2009 01:19 AM
crontab: minute hour or hour minute rjo98 Linux - Newbie 2 11-04-2009 04:09 PM
Aergh. X dies on the hour, every hour l00zer Linux - Software 4 06-07-2005 11:02 PM
change clock from 24 hour to 12 hour in suse 9.2/KDE 3.3 jmlumpkin Linux - Newbie 1 01-23-2005 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration