LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2016, 07:04 PM   #1
SenseSpheres
LQ Newbie
 
Registered: Jan 2016
Posts: 27

Rep: Reputation: Disabled
Question clock is incorrect


For some reason the time on my computer is incorrect. I'm trying to connect to a wireless network (which I've connected to before with success) and unable to. I think that it connected to the incorrect time problem?

Does anyone know why this is happening and a way I could correct it? Thank you so much
 
Old 03-08-2016, 07:07 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Make sure your time zone is set right in timeconfig. Then, as root:

Code:
ntpdate pool.ntp.org
If you're dual-booting with OS X, then your "time zone" is UTC. Otherwise it should be your actual time zone.
 
Old 03-08-2016, 08:04 PM   #3
bateleur
Member
 
Registered: Feb 2016
Distribution: Slackware
Posts: 31

Rep: Reputation: Disabled
In addition, you might also have a look at this: http://docs.slackware.com/howtos:network_services:ntp
 
Old 03-08-2016, 08:04 PM   #4
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 308

Rep: Reputation: 287Reputation: 287Reputation: 287
You're right to suspect that an incorrect timestamp might be giving you network-related problems. dugan's answer will only work if you already have a network connection (which, presumably, you don't). As root, run

Code:
date -s "2016-03-09 00:00:00"
(adjusting the date and time appropriately), then run dugan's ntpdate command after connecting to the network to set a more precise time.
 
1 members found this post helpful.
Old 03-09-2016, 09:38 AM   #5
Gordie
Member
 
Registered: Aug 2007
Location: Nolalu, Ontario, Canada
Distribution: Slackware64-Current
Posts: 871

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
I almost always have to adjust the time after trying a live linux system. Thankfully it doesn't prevent me from connecting.

I su to root and
ntpdate pool.ntp.org
 
Old 03-13-2016, 08:57 AM   #6
Nille_kungen
Member
 
Registered: Jul 2005
Distribution: Slackware64-current
Posts: 587

Rep: Reputation: 201Reputation: 201Reputation: 201
I had some problems using KDE in 14.1 on an laptop and it was related to sleep and hibernation, also check the bios battery if it's an desktop computer.
Check hardware and desktop clocks "hwclock && date" to see if their right (timezone may differ depending on setup).
 
Old 03-13-2016, 12:16 PM   #7
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Edit: Redundant...
 
Old 03-13-2016, 03:54 PM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Couple of things you might want to know about time.

There are two clocks in your system, the hardware clock and the system clock. The hardware clock, a chip, is kept running by the CMOS battery on the motherboard of your computer and the system clock is run by the kernel; it's software. The system clock get set when you boot the system from the hardware clock, the hardware is set from the system clock when you shut down the system.

The timconfig utility is how you configure your system for the time zone it lives in; you should have used that when you installed Slackware to set the time zone. An additional setting is that you have set your system clock to either your actual timezone or you have set it to UTC (it's suggested to set to UTC unless you're dual booting with Windows-something). Setting it to UTC does not affect your timezone, so be sure to set that correctly) -- your timezone takes care of daylight time switches on the right date and time.

Look at /etc/adjtime, it should look something like this if set to UTC:
Code:
cat /etc/adjtime
-0.196475 1457006506 0.000000
1457006506
UTC
If that last line doesn't say UTC, you're hardware clock and system clock are at the same time.

As @dugan suggests, you can use the ntpdate utility to set the time correctly once you have an active network connection. ntpdate sets the system clock, not the hardware clock (that won't get set until you shut the system down).

It's usually a good idea to have the NTP daemon running on your system. You can use the default /etc/npt.conf file (don't twiddle it unless you know what you're doing) and just
Code:
su -
chmod 755 /etc/rc.d/rc.ntpd
which makes it start at boot time and stop at shutdown.

You can start it manually:
Code:
su -
/etc/rc.d/rc.ntpd start
Only do that once (the daemon starts and you don't want two [or more] daemons running, use /etc/rc.d/rc.ntpd stop first).

Your hardware clock needs to be withing 5 minutes of actual time for the NTP daemon to set it. You can use the above described way to set the hardware clock or you can get into the BIOS and set it there to the correct time before booting.

Hope this helps some.
 
  


Reply



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
Clock for the dock or widget clock and how to turn off automatic KDE Wallet Service? greenace92 Debian 1 02-29-2016 09:53 PM
[SOLVED] BIOS clock, localtime, and UTC are all incorrect slack_ Slackware 14 04-18-2014 01:51 PM
Incorrect clock time Stephan_Craft Linux - Newbie 5 07-19-2008 11:08 PM
Clock Time incorrect after shutting down... ltcolfury SUSE / openSUSE 14 07-17-2006 12:50 PM
Incorrect Mouse, Incorrect Keymap, and Trapped in X Kenji Miyamoto Debian 8 08-24-2005 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:32 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
Open Source Consulting | Domain Registration