Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I installed the ntp in kubuntu 13.04, the date is correct but the time is not set correct, the local time is same as the UTC time, my local time zone is set correctly, this is the /etc/ntp.conf:
Quote:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
# 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
# Specify one or more NTP servers.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org
##
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com
# 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
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255
# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
and this is ntpq -p command i don't know if this can help:
Quote:
remote refid st t when poll reach delay offset jitter
==============================================================================
+113.30.137.34 108.199.26.138 3 u 51 128 377 249.634 -24.005 10.312
-31.169.iconpln. 111.92.175.248 3 u 43 128 377 223.382 -58.500 13.574
-120-88-47-10.in 10.84.87.146 2 u 48 128 377 394.758 45.819 9.373
+superluminal.sf 131.113.192.40 2 u 98 128 377 400.725 -4.357 7.560
-beitel.indoforu 47.187.174.51 2 u 46 128 377 237.214 -96.126 16.586
-ec2-54-254-17-2 203.123.48.219 2 u 107 128 377 307.772 79.869 18.120
-202.71.100.89 203.106.109.85 4 u 100 128 355 124.975 -2.709 157.665
*europium.canoni 193.79.237.14 2 u 44 128 375 198.921 -36.770 10.791
Your system time is within 100 msec of 8 different servers. Why do you believe it is not correct? What does "date" print and your phone show, for example?
If you time zone is set correctly then the problem is typically due to the fact that your hardware clock is set to local time but the OS thinks it is UTC or vice versa.
Check the /etc/default/rcS file to see if utc=yes or no and check the hardwark clock time.
# zdump -v /etc/localtime
/etc/localtime Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 20:45:52 1901 UTC isdst=0 gmtoff=0
/etc/localtime Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 20:45:52 1901 UTC isdst=0 gmtoff=0
/etc/localtime Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 03:14:07 2038 UTC isdst=0 gmtoff=0
/etc/localtime Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 03:14:07 2038 UTC isdst=0 gmtoff=0
Quote:
# zdump -v +4:30
+4:30 Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 20:45:52 1901 isdst=0 gmtoff=0
+4:30 Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 20:45:52 1901 isdst=0 gmtoff=0
+4:30 Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 03:14:07 2038 isdst=0 gmtoff=0
+4:30 Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 03:14:07 2038 isdst=0 gmtoff=0
All of my systems are the same...
Using time zone aft-4:30 will give you a +4:30 UTC offset.
Code:
zdump -v aft-4:30
aft-4:30 Fri Dec 13 20:45:52 1901 UTC = Sat Dec 14 01:15:52 1901 aft isdst=0 gmtoff=16200
aft-4:30 Sat Dec 14 20:45:52 1901 UTC = Sun Dec 15 01:15:52 1901 aft isdst=0 gmtoff=16200
aft-4:30 Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 07:44:07 2038 aft isdst=0 gmtoff=16200
aft-4:30 Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 07:44:07 2038 aft isdst=0 gmtoff=16200
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.