Slackware This Forum is for the discussion of Slackware Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
11-17-2013, 08:32 PM
|
#1
|
LQ Newbie
Registered: Oct 2012
Location: United States of America
Distribution: Slackware
Posts: 13
Rep:
|
Time never syncs right
I am trying to sync with the US time server. Every time I do, it will result in a time that is way off. If it's 7 PM, it would be set to 1 AM of the next day.
|
|
|
11-17-2013, 08:37 PM
|
#2
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348
Rep:
|
Tour time zone settings are probably incorrect. What does date say about your time zone? If it doesn't match your physical location, run timeconfig to select a different time zone.
Are you using ntpd to synchronize the clock? Which time server(s) are you using?
|
|
1 members found this post helpful.
|
11-17-2013, 09:56 PM
|
#3
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,677
|
Linux systems are commonly set to UTC (Greenwich Mean) time and use the timezone setting to convert that to local time for display purposes. In general, servers are commonly set to UTC time for world-wide time compatibility and Linux is descended from serverland.
This article will tell you more about how time works on Slackware.
It took me quite a while (like years), but I finally figured out to my own satisfaction how to set time in a way that works for me. The only effective way to do it thoroughly is as root, from the command line.
I will use the date command to set the time I desire, then the hwclock ( hard ware clock) command to set the hardware clock to the system time.
Code:
date -s [time string] <-------set time
hwclock -w <-------set hardware clock to system time
Last edited by frankbell; 11-17-2013 at 09:59 PM.
|
|
|
11-17-2013, 10:43 PM
|
#4
|
LQ Newbie
Registered: Oct 2012
Location: United States of America
Distribution: Slackware
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by Ser Olmy
Tour time zone settings are probably incorrect. What does date say about your time zone? If it doesn't match your physical location, run timeconfig to select a different time zone.
Are you using ntpd to synchronize the clock? Which time server(s) are you using?
|
I had before reading this, i had to manually reset it. Now doing...
...in console as a normal user gives me the right time.
Yes, I am using ntpd. The server is, us.pool.ntp.org. Still though it never works right.
In case if this matters, I generally set my hardware clock to localtime, not UTC.
EDIT: From Sunday night to noon Friday, I am unable to access such servers (and several other servers/websites) for some weird reason.
Last edited by GiveMeSomeSlackware; 11-17-2013 at 10:51 PM.
|
|
|
11-18-2013, 12:37 AM
|
#5
|
Member
Registered: Mar 2012
Location: Ukraine/Odesa
Distribution: Slackware
Posts: 152
Rep:
|
Same problem, in 14.1 have some problem with time.
|
|
|
11-18-2013, 02:04 AM
|
#6
|
Senior Member
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
|
About a decade ago I got tired of dorking around with ntp's capriciousness and wrote a little script:
http://ciar.org/ttk/public/rsetdate
It gets the clock close enough for personal use (within a second), so I just stick it in /etc/cron.daily and forget about it. It's not a good solution, just a convenient one.
|
|
|
11-18-2013, 04:07 AM
|
#7
|
Member
Registered: Jul 2007
Location: Nottingham, UK
Distribution: Slackware64-current
Posts: 93
Rep:
|
Are you using KDE as your desktop environment? If so you need to set the correct timezone in KDE as well. Right click on the digital clock in the task bar then select "Adjust Date and Time"
|
|
|
11-18-2013, 08:15 AM
|
#9
|
LQ Newbie
Registered: Oct 2012
Location: United States of America
Distribution: Slackware
Posts: 13
Original Poster
Rep:
|
the settings in kde are correct to. I still don't get why I am having so many problems with it.
Last edited by GiveMeSomeSlackware; 11-18-2013 at 08:16 AM.
|
|
|
11-18-2013, 08:33 AM
|
#10
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348
Rep:
|
Quote:
Originally Posted by GiveMeSomeSlackware
the settings in kde are correct to. I still don't get why I am having so many problems with it.
|
Could you post the following: - your current time/date and timezone settings as reported by date
- the output from hwclock --show
- the output from zcat /proc/config.gz | grep CONFIG_RTC_[SH]
- the contents of /etc/ntp.conf (perhaps filtered through grep -v "^#.*" for brevity)
FWIW, I'm using ntpd on several Slackware systems with the hardware clock set to local time, and apart from some issues with the RTC options in recent kernels, I haven't had any problems at all.
|
|
|
11-18-2013, 10:41 AM
|
#11
|
LQ Newbie
Registered: Oct 2012
Location: United States of America
Distribution: Slackware
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by Ser Olmy
Could you post the following: - your current time/date and timezone settings as reported by date
- the output from hwclock --show
- the output from zcat /proc/config.gz | grep CONFIG_RTC_[SH]
- the contents of /etc/ntp.conf (perhaps filtered through grep -v "^#.*" for brevity)
FWIW, I'm using ntpd on several Slackware systems with the hardware clock set to local time, and apart from some issues with the RTC options in recent kernels, I haven't had any problems at all.
|
bash-4.2# date
Mon Nov 18 09:40:29 CST 2013
bash-4.2# hwclock --show
Mon 18 Nov 2013 09:40:33 AM CST -0.626721 seconds
bash-4.2# zcat /proc/config.gz | grep CONFIG_RTC_[SH]
# CONFIG_RTC_HCTOSYS is not set
# CONFIG_RTC_SYSTOHC is not set
bash-4.2#
EDIT: I don't understand this "grep" thing. What does it do?
Last edited by GiveMeSomeSlackware; 11-18-2013 at 10:43 AM.
|
|
|
11-18-2013, 10:48 AM
|
#12
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,348
Rep:
|
Quote:
Originally Posted by GiveMeSomeSlackware
bash-4.2# date
Mon Nov 18 09:40:29 CST 2013
bash-4.2# hwclock --show
Mon 18 Nov 2013 09:40:33 AM CST -0.626721 seconds
|
According to the official source, both your system and hardware clocks are showing the correct time for the CST time zone.
Quote:
Originally Posted by GiveMeSomeSlackware
EDIT: I don't understand this "grep" thing. What does it do?
|
It just reads data from standard input (usually piped from some other program), and displays lines matching the search criteria (or lines not matching the search criteria, if you use the "-v" switch).
Last edited by Ser Olmy; 11-18-2013 at 10:49 AM.
|
|
1 members found this post helpful.
|
11-19-2013, 06:46 PM
|
#13
|
Member
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909
Rep:
|
My clock is off all the time too. right now I am 24 minutes too fast. I tried the steps found here are not helping. Anyone come up with a solution please do post here. Thanks
|
|
|
11-19-2013, 07:09 PM
|
#14
|
LQ Veteran
Registered: May 2008
Posts: 7,071
|
/etc/rc.d/rc.ntpd stop (if it's running)
timeconfig
ntpdate pool.ntp.org
hwclock --localtime --systohc or hwclock --utc --systohc (depending on what you chose in timeconfig)
/etc/rc.d/rc.ntpd start (if you want)
It's possible existing processes/daemons may still be using the old timezone, stop/start them or if in doubt reboot.
|
|
1 members found this post helpful.
|
11-20-2013, 09:03 PM
|
#15
|
Member
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210
Rep:
|
Quote:
Originally Posted by NightSky
My clock is off all the time too. right now I am 24 minutes too fast. I tried the steps found here are not helping. Anyone come up with a solution please do post here. Thanks
|
There is no one solution. What is the output of `ntpq -p -c rv`? Should you launch ntpd with the -g flag (allow first adjustment to be large), does the time get set correctly and then drift later? More questions may follow.
|
|
|
All times are GMT -5. The time now is 02:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|