Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running a (fairly) fresh install of CentOS 6.

[jammy@peach]$ date
Fri Jul 13 15:41:30 BST 2012

The actual BST time is exactly one hour ahead of this, 16:41.

Unless I'm missing something about how DST works, shouldn't my server be reporting the correct (i.e UTC+1) time, considering its timezone is set to BST?

Does the server need its clock updated or do I need to change its timezone to something else?

share|improve this question
1  
Try synchronize with an NTP server by running ntpdate. – quantum Jul 13 '12 at 16:03
    
hah just beat me to it :) yeah that's what I ended up doing – jammypeach Jul 13 '12 at 16:07

Try this:

# ntpdate uk.pool.ntp.org

should synchronize your server with the network time protocol servers above.

# yum install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# /etc/init.d/ntpd start

If you don't have ntp installed you can try the above commands to install ntp.

# hwclock --systohc

should synchronize date and time for the hardware clock.

share|improve this answer
    
I had all that done but the hwclock part, thanks for that – jammypeach Jul 16 '12 at 8:23
up vote 0 down vote accepted

I don't know why this wasn't right to start with, but syncing the clock with an NTP server got it set to the right time.

I had to install a few things though, here's what and how:

[jammy@peach]$ date
Fri Jul 13 16:01:40 BST 2012

[jammy@peach]$ yum install ntp

[jammy@peach]$ sudo ntpdate uk.pool.ntp.org
13 Jul 17:01:50 ntpdate[32274]: step time server 83.231.183.4 offset 3494.293121 sec

[jammy@peach]$ date
Fri Jul 13 17:01:57 BST 2012

Might be worth a cron job I think...

Links:

http://www.pool.ntp.org/en/

http://www.ntp.org/

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .