Author Topic: {solved} leave my hw clock alone, please!  (Read 826 times)

Offline Nish

  • Sr. Member
  • ****
  • Posts: 384
    • SMQ's Adventures in Linux
{solved} leave my hw clock alone, please!
« on: May 06, 2011, 05:48:03 AM »
I have searched the forum and found several posts.  Tried OP and Neal's (think it was Neal) suggestions.  Not solving the problem.

I have a dual boot machine which unfortunately is being changed over to a windows media PC but I still would like to keep the linux on it for surfing in the bedroom and talking to my other PCs in a linux clique.

However, on every boot to linux it changes the hardware clock to UTC.  And when I boot into windows it is five hours off of course.  That is a real problem for a media pc.

I have gone into the clock file in sysconfig as root and changed to UTC=false but PCLOS continues to change my hardware clock every time it is booted. There must be some way to stop this?
« Last Edit: May 06, 2011, 09:17:49 AM by Nish »
Never borrow time.  The interest will kill you - signed Mastercard & Visa

Embrace the Bird.  http://www.smqlinux.com - an old lady's adventures in linuxdom

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15515
  • ┌∩┐(◕_◕)┌∩┐
Re: leave my hw clock alone, please!
« Reply #1 on: May 06, 2011, 05:55:21 AM »
Have considered (or tried) using the Network Time Protocol via the Public Time Server(s)

I'm in the UK and I link to uk.pool.ntp.org but you can choose whichever one suits. 

PCLinuxOS 32bit KDE 4.10.4; kernel-3.4.11-pclos1.bfs & 64bit 3.4.38bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: leave my hw clock alone, please!
« Reply #2 on: May 06, 2011, 05:57:17 AM »
Go into the PCC, System, Manage Date and Time.

If you enable network time protocol. Changing the timezone will force the program to ask whether or not your clock is gmt/utc (select No).

Click OK. You should be right.

HTH

 :)
$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Nish

  • Sr. Member
  • ****
  • Posts: 384
    • SMQ's Adventures in Linux
Re: leave my hw clock alone, please!
« Reply #3 on: May 06, 2011, 06:00:58 AM »
menotu, Yes, I am using the north america one. It is not a problem of my time being inaccurate in linux, the problem is it changes my bios time to UTC and windows picks up the bios times and is wrong so that I cannot record shows in windows (tuner card doesn't work in linux so this particular machine has to be windows mostly)

Village: I have done that, and it knows hw clock is not UTC but on every boot into PCLinuxOS there it goes changing the hw clock to UTC.  There must be something else changing it but what?  I have confirmed the sysconfig file remains false for UTC and time zone is new york
Never borrow time.  The interest will kill you - signed Mastercard & Visa

Embrace the Bird.  http://www.smqlinux.com - an old lady's adventures in linuxdom

Offline Ramchu

  • Hero Member
  • *****
  • Posts: 1593
Re: leave my hw clock alone, please!
« Reply #4 on: May 06, 2011, 06:05:34 AM »
In your windows installation go in and set the windows clock to sync with the microsoft time server

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_date_change_server.mspx

Offline Village Idiot

  • Hero Member
  • *****
  • Posts: 2345
  • Have A Nice Day.
Re: leave my hw clock alone, please!
« Reply #5 on: May 06, 2011, 06:13:00 AM »
That's probably the best solution, Ramchu. I've forgotten what windows even looks like.  :-\

Nish, I don't know what DE you are using. I use lxde but I seem to remember KDE can be configured to mess with the clock. I use the word mess in the nicest possible way because I believe it's intentions are kind. I don't know if this is still the case or if KDE still does this. The point is it might be prudent to check if your DE is not playing around with the clock an addition to drakclock(the program that is used in PCC).

I am totally flying blind but I do remember having to go in and nuke the kde automatic clock settings on a system I once set up for someone. Unfortunately I don't remember the full details and I'd hope someone can chime in to take it from here....

Sorry I'm not much help.  :-[

$ fortune
No Microsoft products were used in any way for the creation of this message.
If you are using a Microsoft product to view it, BEWARE! - I'm not
responsible for any harm you might encounter as a result.

Offline Nish

  • Sr. Member
  • ****
  • Posts: 384
    • SMQ's Adventures in Linux
Re: leave my hw clock alone, please!
« Reply #6 on: May 06, 2011, 06:18:47 AM »
Ramchu, tried that one also  ;)  windows gives me an error that it cannot connect (I did try shutting down zone alarm, still no connect) I also tried to get it to sync with the other choice it gives me - the .gov one I believe.  Same deal, no connect.  All I can do is manually change the time back five hours every time I boot windows if linux had been booted previously.

Only workaround I can think of right now is to use this task recorder I use at work to change the time on every boot into windows - not sure how awkward that is going to get while I have a tv recorder set to go also.

Last resort is to remove linux from this particular machine.  I rather not, I keep trying to get the card to work with linux and I want to surf and do other things on it - the only thing windows is doing on here is for recording TV :'(
Never borrow time.  The interest will kill you - signed Mastercard & Visa

Embrace the Bird.  http://www.smqlinux.com - an old lady's adventures in linuxdom

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6849
  • MLU
Re: leave my hw clock alone, please!
« Reply #7 on: May 06, 2011, 06:24:49 AM »
Check the following in order

the correct Locale is set in PCC

the correct Timezone is set in PCC

the correct time is set in PCC

the correct Timezone is set in KCC if using KDE.

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6475
  • I'm going South
Re: leave my hw clock alone, please!
« Reply #8 on: May 06, 2011, 06:35:50 AM »
Nish,

It seems that you've checked/changed the first line in /etc/sysconfig/clock, but what about /etc/adjtime? In your case the third line should be LOCAL.

But it's possible that Just19's advice is all you need.
« Last Edit: May 06, 2011, 07:26:40 AM by Bald Brick »
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline Nish

  • Sr. Member
  • ****
  • Posts: 384
    • SMQ's Adventures in Linux
Re: leave my hw clock alone, please!
« Reply #9 on: May 06, 2011, 07:23:39 AM »
well, had done everything that Just19 listed, but before I heard from you, Bald Brick, I went back into control center and turned off the synch, went and changed my timezone to another, got the message about hw clock/utc told it no, changed back to correct timezone.  Rebooted, rebooted again to check the bios and the clock is correct for local in there YAY

On your advice I have now looked at adjtime and it is set to LOCAL.  So hopeful, I am now going to back into control center and try turning the time synch on again.  IF it changes the hardware clock to UTC, I will turn it back off and leave it off at this point.  Easy enough for me to check it now and then to make sure it doesn't get too far off.  I keep an eye on my CMOS battery level anyway since I hate to lose BIOS settings so time should not get off by much.

Will update and mark solved if it doesn't make it go to UTC. Probably there is something to Just19's order - it seems like a dance you have to choreograph and it really is only a problem if you use windows a lot.  Thanks all
Never borrow time.  The interest will kill you - signed Mastercard & Visa

Embrace the Bird.  http://www.smqlinux.com - an old lady's adventures in linuxdom

Offline T6

  • Super Villain
  • ******
  • Posts: 19051
  • xmas is comming!
Re: leave my hw clock alone, please!
« Reply #10 on: May 06, 2011, 07:31:15 AM »
this post is interesting

i am having the same problem but not on linux

the xp install adds 5 hours always

sometimes it corrects itself when i force it to auto update but mostly it is just weird unusable

linux remains untouched

wasn't this a setting related to gmt/utc or something similar?

i think i remember something on madriva that fixed this but can't be sure what
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Nish

  • Sr. Member
  • ****
  • Posts: 384
    • SMQ's Adventures in Linux
Re: leave my hw clock alone, please!
« Reply #11 on: May 06, 2011, 09:17:07 AM »
not sure what you are saying but if you have a dual or multi boot and windows is adding 5 hours you could be the same situation, indeed.  If you are eastern time (5 hours from GMT).  In my case, Windows added 5 hours because my bios told it 5 plus hours because PCLOS insisted on change the hw clock to GMT (UTC)

I am now fixed.  Whether it was

Check the following in order

the correct Locale is set in PCC

the correct Timezone is set in PCC

the correct time is set in PCC

the correct Timezone is set in KCC if using KDE.

since I had done all that but not necessarily in that order or perhaps it was messing about one more time in control center, I am OK now.  I also know there are two config files to look at.

I am going to mark this solved.
Never borrow time.  The interest will kill you - signed Mastercard & Visa

Embrace the Bird.  http://www.smqlinux.com - an old lady's adventures in linuxdom

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6475
  • I'm going South
Re: leave my hw clock alone, please!
« Reply #12 on: May 06, 2011, 09:52:50 AM »
not sure what you are saying but if you have a dual or multi boot and windows is adding 5 hours you could be the same situation, indeed.  If you are eastern time (5 hours from GMT).  In my case, Windows added 5 hours because my bios told it 5 plus hours because PCLOS insisted on change the hw clock to GMT (UTC)

I am now fixed.  Whether it was

Check the following in order

the correct Locale is set in PCC

the correct Timezone is set in PCC

the correct time is set in PCC

the correct Timezone is set in KCC if using KDE.

since I had done all that but not necessarily in that order or perhaps it was messing about one more time in control center, I am OK now.  I also know there are two config files to look at.

There's actually more than two.

The hardware clock is used to set the system clock at boot; after that it isn't read anymore unless you check it manually or set up something like the ntp daemon to check it. Then, on PCLinuxOS, the hardware clock is synchronized to the system clock when you shutdown your system (with the command /sbin/hwclock --systohc in the script /etc/rc.d/init.d/halt). Or you can set up your hardware clock to be synchronized much more frequently, for instance by editing the file /etc/sysconfig/ntpd.

But no matter how the hardware clock is set, your UTC/LOCAL settings should tell the system whether your Bios time is the same as your local time or not. If they don't, it can be very hard to find the reason.

Quote
I am going to mark this solved.

I'm glad Just19's recipe worked.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D