SlackwareThis 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.
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 have tried all sorts of commands - hwclock, clock, date, and timeconfig. Nothing seems to really sort out my problem.
I am in London, UK, but when i set the clock with timeconfig it still sets the time to GMT (London time) -1 hour. I can set it back with date --set=(time) but this reverts with each new session back to GMT -1. I have spent ages googling around on this and tried several different methods but i'm still stuck!
For the UK you want to use the 'GB' option in timeconfig, not the 'London' one.
If you dual boot with windows, you'll want the "hardware clock is localtime option", otherwise use the UTC option.
Once you've got that right do a: ntpdate ntp.virginmedia.com
or use the date command to set the time manually
And then, depending on whether your hardware clock is going to be localtime or utc, either: hwclock -w --localtime
or hwclock -w --utc
Yes it was showing GMT when i ran that command, as I was trying different options at the time. I had been using London time though, which I have always selected in previous linux systems I have used. I tried various different options, as in my previous post - GB, GMT, London. All the logical choices give incorrect times.
Yes we are currently on BST (British Summer Time, for which there is no setting) which is GMT+1. Are you telling me that i need to select GMT+1, then remember to change it back to GMT when BST ends? That doesn't sound right to me, that shouldn't be a manual process surely??
No, GB should do the right thing, but GMT would not. The GB time zone should already know about when British Summer Time starts and stops. The GMT time zone won't care.
What does the command
Code:
echo $TZ
give you? (It may give you a blank line, which is OK.) How about
I assume that you have the time zone set to GB; I'm in the Central time zone, and my date command will give CDT for Central Daylight Time.
So what do you get when you issue the command
Code:
/sbin/hwclock -r && date
?
I get something like...
Code:
flacy@flacy:~$ /sbin/hwclock -r && date
Tue 17 Aug 2010 05:38:54 PM CDT -0.687922 seconds
Tue Aug 17 17:38:54 CDT 2010
I'm just trying to see if your hardware clock and kernel time agree. If they do, then we can try to manually set them both and then you can do whatever it is that triggers the "they are now off" behavior.
Richard, I think I have solved this (before reading your last post), though I don't know how it works exactly.
I dual boot with Ubuntu on this laptop and suspected this may be something to do with it. Booting into Ubuntu I found that it was set to Local, London time. I changed that to UTC, GB time. Rebooting into Slackware it is now correct, set to UTC, GB time.
Thanks for your help anyway it is much appreciated, i'm sure we would've got there in the end
No problem. Don't forget to mark the thread [SOLVED].
I suspect that if you ensure both Ubuntu and Slackware have working ntp configurations, then even if both distributions had a different idea of what was stored in the hardware clock, you would not really notice the problem. (I know Slackware starts the ntp daemon with the permission to change the clock as much as required to get it in line with the ntp server information. I'm sure Ubuntu does the same.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.