NTP Sync problem

Asked by ramesh raman

I have configured NTP server in UBUNTU10.04 LTS server edition.
I am working for UK client so i need to set uk time for server for that i configured ntp.conf file

It is syncing but time shows one our lagging to the current UK time how to rectify this proble please give suggestion.

when i issue date command it shows Thu Oct 25 13:17:14 GMT 2012
but when i see current UK time in iternet it shows Thu Oct 25 14:20:25 GMT 2012
What is the problem or it is right one

following the lines are used in config file
jaiken@live:~$ cat /etc/ntp.conf
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift

# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com
server ntp.exnet.com

restrict uk.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict ntp2a.mcc.ac.uk mask 255.255.255.255 nomodify notrap noquery
restrict -4 ntp.maths.tcd.ie mask 255.255.255.255 nomodify notrap noquery

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ntp Edit question
Assignee:
No assignee Edit question
Solved by:
Warren Hill
Solved:
Last query:
Last reply:
Revision history for this message
Subin Hutton (djlynux) said :
#1

The UK time is GST or BST? When I did a simple search in google based on your inputs, I got the following update

14:58 Thursday (BST) - Time in United Kingdom

Where as GMT time is 13:58.

Can you just confirm this again?

Revision history for this message
ramesh raman (rbmramesh) said :
#2

Hi Subin Hutton,

Hi please help on this,
Is The server shows time is correct one or wrong?

I used to check the current UK time in following link

http://www.worldtimeserver.com/current_time_in_GB.aspx
http://wwp.greenwichmeantime.co.uk/time-zone/europe/uk/time/

On Thu, Oct 25, 2012 at 7:31 PM, Subin Hutton <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Open => Needs information
>
> Subin Hutton requested more information:
> The UK time is GST or BST? When I did a simple search in google based
> on your inputs, I got the following update
>
> 14:58 Thursday (BST) - Time in United Kingdom
>
> Where as GMT time is 13:58.
>
> Can you just confirm this again?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#3

Ramesh, You check the first url you can see the current time is actually in BST (which is british standard time). So in the second url it clearly says what BST is actually GMT + 1hour. So from the date command output (from your server) I can understand that, you've set the server time as GMT which is not the british standard time (you should learn about day light savings).

What I propose you that, follow the steps below

Applications>Accessories>Terminal

dpkg-reconfigure tzdata

Follow the directions in the terminal.

And also read the wiki article about ubuntutime https://help.ubuntu.com/community/UbuntuTime

Hope it will resolve this issue. First of all you need to understand that GMT is not BST now.

Sample output from my test box

subin@djlynux:~$ sudo dpkg-reconfigure tzdata
[sudo] password for subin:

Current default time zone: 'Europe/London'
Local time is now: Thu Oct 25 15:28:35 BST 2012.
Universal Time is now: Thu Oct 25 14:28:35 UTC 2012.

Make sure that you select London from the list.

Revision history for this message
Warren Hill (warren-hill) said :
#4

In the UK we have GMT and BST. GMT (Grenwich mean time) is based on the sun being directly overhead at noon this is used for winter. BST (British summer Time) is used for Summer and is one hour ahead so when its 12:00 GMT its 13:00 BST.

We are currently using BST and will be until 2:00 AM BST on Sunday 28th of October when it will change to 1:00 AM GMT (or UTC). The clocks change back to BST on 31 March 2012.

I don't know which time you want the server to be on but I trust this clarifies current UK time.

Revision history for this message
Subin Hutton (djlynux) said :
#5

Hope Warren Hill gave you the exact details about GMT and BST. From your email what I can understand that, your client is actually from UK and he wants it to be in local time. So better select london in tzdata and enable ntp service in your service. It will automatically update the changes in day light changes. You don't need to worry about that. You just make sure that, you selected the right timezone and ntp service is running perfectly.

Revision history for this message
ramesh raman (rbmramesh) said :
#6

Hi Subin Hutton,

PFA for your reference.

On Thu, Oct 25, 2012 at 7:51 PM, ramesh raman <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Needs information => Open
>
> You gave more information on the question:
> Hi Subin Hutton,
>
> Hi please help on this,
> Is The server shows time is correct one or wrong?
>
> I used to check the current UK time in following link
>
> http://www.worldtimeserver.com/current_time_in_GB.aspx
> http://wwp.greenwichmeantime.co.uk/time-zone/europe/uk/time/
>
>
> On Thu, Oct 25, 2012 at 7:31 PM, Subin Hutton <
> <email address hidden>> wrote:
>
> > Your question #212284 on Ubuntu changed:
> > https://answers.launchpad.net/ubuntu/+question/212284
> >
> > Status: Open => Needs information
> >
> > Subin Hutton requested more information:
> > The UK time is GST or BST? When I did a simple search in google based
> > on your inputs, I got the following update
> >
> > 14:58 Thursday (BST) - Time in United Kingdom
> >
> > Where as GMT time is 13:58.
> >
> > Can you just confirm this again?
> >
> > --
> > To answer this request for more information, you can either reply to
> > this email or enter your reply at the following page:
> > https://answers.launchpad.net/ubuntu/+question/212284
> >
> > You received this question notification because you asked the question.
> >
>
>
> --
> Regards
>
> Ramesh R
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
ramesh raman (rbmramesh) said :
#7

Hi Warren,

Thanks for your information, But what i need to do on oct 28th 2:00 AM BST
.
I configured one server with NTP another one i am not configured with NTP.

1. NTP configured server shows time like this (It configured with
server ntp.ubuntu.com)
root@live:~# date
Thu Oct 25 14:51:25 GMT 2012
root@live:~# For this this server What can i do on oct28th or automatically
it will sync with ntp.ubuntu.com

Another one server not configured with NTP). Now it is set time with manual

internet link url also shows same
jaiken@351967-app2:~$ date
Thu Oct 25 15:51:56 GMT 2012

For this server what can i to do on oct28th. can i set date manually for
this one

On Thu, Oct 25, 2012 at 8:15 PM, Warren Hill <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Warren Hill proposed the following answer:
> In the UK we have GMT and BST. GMT (Grenwich mean time) is based on the
> sun being directly overhead at noon this is used for winter. BST
> (British summer Time) is used for Summer and is one hour ahead so when
> its 12:00 GMT its 13:00 BST.
>
> We are currently using BST and will be until 2:00 AM BST on Sunday 28th
> of October when it will change to 1:00 AM GMT (or UTC). The clocks
> change back to BST on 31 March 2012.
>
> I don't know which time you want the server to be on but I trust this
> clarifies current UK time.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=3
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#8

Ramesh, hope you saw the reply that you sent. Follow the steps.

1. Install ntp in both servers and start the services

2. execute the command 'sudo dpkg-reconfigure tzdata'

This command will reconfigure your timezone settings. Once you enter this command, it will show you a list of places. From here select Europe then select London. Thats all. Now execute the date command and verify that the time automatically changes to BST.

Advantages:

You enabled ntp services in both the servers, so it will automatically adjust the time connecting to the remote ntp server which is configured in your ntp configuration. Whether its GMT or BST.

If you have any question let us know.

Revision history for this message
ramesh raman (rbmramesh) said :
#9

Hi Subin Hutton ,

I newly take over this project so i confused with UK time.
How to configure with current local time and with NTP enable?
Please help on this.

On Thu, Oct 25, 2012 at 8:30 PM, RAMESH RAMAN <email address hidden> wrote:

> Hi Warren,
>
> Thanks for your information, But what i need to do on oct 28th 2:00 AM BST
> .
> I configured one server with NTP another one i am not configured with NTP.
>
> 1. NTP configured server shows time like this (It configured with
> server ntp.ubuntu.com)
> root@live:~# date
> Thu Oct 25 14:51:25 GMT 2012
> root@live:~# For this this server What can i do on oct28th or
> automatically it will sync with ntp.ubuntu.com
>
>
>
> Another one server not configured with NTP). Now it is set time with manual
>
> internet link url also shows same
> jaiken@351967-app2:~$ date
> Thu Oct 25 15:51:56 GMT 2012
>
>
> For this server what can i to do on oct28th. can i set date manually for
> this one
>
>
>
>
>
>
>
>
> On Thu, Oct 25, 2012 at 8:15 PM, Warren Hill <
> <email address hidden>> wrote:
>
>> Your question #212284 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/212284
>>
>> Warren Hill proposed the following answer:
>> In the UK we have GMT and BST. GMT (Grenwich mean time) is based on the
>> sun being directly overhead at noon this is used for winter. BST
>> (British summer Time) is used for Summer and is one hour ahead so when
>> its 12:00 GMT its 13:00 BST.
>>
>> We are currently using BST and will be until 2:00 AM BST on Sunday 28th
>> of October when it will change to 1:00 AM GMT (or UTC). The clocks
>> change back to BST on 31 March 2012.
>>
>> I don't know which time you want the server to be on but I trust this
>> clarifies current UK time.
>>
>> --
>> If this answers your question, please go to the following page to let us
>> know that it is solved:
>> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=3
>>
>> If you still need help, you can reply to this email or go to the
>> following page to enter your feedback:
>> https://answers.launchpad.net/ubuntu/+question/212284
>>
>> You received this question notification because you asked the question.
>>
>
>
>
> --
> Regards
>
> Ramesh R
>

--
Regards

Ramesh R

Revision history for this message
Warren Hill (warren-hill) said :
#10

In post #5 Subin appears to be suggesting change will be automatic but I'm in no position to answer either way.

Revision history for this message
ramesh raman (rbmramesh) said :
#11

Hi Subin Hutton,

Thanks alot for your Valid information. Could you give me link or
installation procedure to configure NTP server .

On Thu, Oct 25, 2012 at 8:41 PM, Subin Hutton <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Open => Answered
>
> Subin Hutton proposed the following answer:
> Ramesh, hope you saw the reply that you sent. Follow the steps.
>
> 1. Install ntp in both servers and start the services
>
> 2. execute the command 'sudo dpkg-reconfigure tzdata'
>
> This command will reconfigure your timezone settings. Once you enter
> this command, it will show you a list of places. From here select Europe
> then select London. Thats all. Now execute the date command and verify
> that the time automatically changes to BST.
>
> Advantages:
>
> You enabled ntp services in both the servers, so it will automatically
> adjust the time connecting to the remote ntp server which is configured
> in your ntp configuration. Whether its GMT or BST.
>
> If you have any question let us know.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=7
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#12

There is actually good wiki article that I've already mentioned in my previous post. You can take look at it.

https://help.ubuntu.com/community/UbuntuTime

Revision history for this message
ramesh raman (rbmramesh) said :
#13

Hi Subin Hutton,

Thanks for your information . If time zone is not correct, I will change
time zone to Europe /London .
After that i will restart the NTP service.

On Thu, Oct 25, 2012 at 9:01 PM, Subin Hutton <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Open => Answered
>
> Subin Hutton proposed the following answer:
>
> There is actually good wiki article that I've already mentioned in my
> previous post. You can take look at it.
>
> https://help.ubuntu.com/community/UbuntuTime
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=11
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
ramesh raman (rbmramesh) said :
#14

Hi Subin Hutton,

From your last two mail there is no message from your side. Actually Client
office located in Harrow shall i use time zone as Europe/London.

On Thu, Oct 25, 2012 at 9:11 PM, ramesh raman <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Answered => Open
>
> You are still having a problem:
> Hi Subin Hutton,
>
> Thanks for your information . If time zone is not correct, I will change
> time zone to Europe /London .
> After that i will restart the NTP service.
>
> On Thu, Oct 25, 2012 at 9:01 PM, Subin Hutton <
> <email address hidden>> wrote:
>
> > Your question #212284 on Ubuntu changed:
> > https://answers.launchpad.net/ubuntu/+question/212284
> >
> > Status: Open => Answered
> >
> > Subin Hutton proposed the following answer:
> >
> > There is actually good wiki article that I've already mentioned in my
> > previous post. You can take look at it.
> >
> > https://help.ubuntu.com/community/UbuntuTime
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> >
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=11
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/ubuntu/+question/212284
> >
> > You received this question notification because you asked the question.
> >
>
>
> --
> Regards
>
> Ramesh R
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#15

Indeed, you can use London time.

>>From your last two mail there is no message from your side

I didn't understand this question though :)

Revision history for this message
Best Warren Hill (warren-hill) said :
#16

I would all of UK is same time zone so time in Harrow and London are the same.

Revision history for this message
ramesh raman (rbmramesh) said :
#17

Hi,

Thanks to all, I didn't expect like this response from your team.Your doing
great job again thanks once. I worked 5years in Mandriva Linux but i didn't
get like this response . I will work out what you said to me for the time
zone .

On Thu, Oct 25, 2012 at 9:21 PM, Warren Hill <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Warren Hill proposed the following answer:
> I would all of UK is same time zone so time in Harrow and London are the
> same.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=15
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#18

happy to hear that. Just let us know how it goes :)

Revision history for this message
ramesh raman (rbmramesh) said :
#19

Hi,

I changed to Europe/London now it shows correct BST time . If client ask to
change GMT mean what to do ?
What zone can i select?

On Thu, Oct 25, 2012 at 9:31 PM, Subin Hutton <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Open => Answered
>
> Subin Hutton proposed the following answer:
> happy to hear that. Just let us know how it goes :)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=17
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
Subin Hutton (djlynux) said :
#20

When you execute the command 'sudo dpkg-reconfigure tzdata', there is an option in the bottom which is etc. Enter there . Then GMT/UTC will show up there.

Revision history for this message
ramesh raman (rbmramesh) said :
#21

Hi Subin,

Thanks for your guidance.If anything i will send message to you. Thanks for
ubuntu team.

On Thu, Oct 25, 2012 at 9:51 PM, Subin Hutton <
<email address hidden>> wrote:

> Your question #212284 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> Status: Open => Answered
>
> Subin Hutton proposed the following answer:
> When you execute the command 'sudo dpkg-reconfigure tzdata', there is an
> option in the bottom which is etc. Enter there . Then GMT/UTC will show
> up there.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/212284/+confirm?answer_id=19
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/212284
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R

Revision history for this message
ramesh raman (rbmramesh) said :
#22

This resolved my problem. Thanks alot