LinHES Forums
http://forums.linhes.org/

XMLTV Offset not working
http://forums.linhes.org/viewtopic.php?f=17&t=9198
Page 1 of 1

Author:  infinitenothing [ Thu Mar 23, 2006 2:07 pm ]
Post subject:  XMLTV Offset not working

I want to keep my system clock to local time rather than GMT because I have the system dual booting Windows, so I set the local time zone to GMT to keep the local time correct. Of course, as you can predict, the Program Guide is off. I changed The XMLTV offset in mythtv-setup>general and ran mythfilldatabase but it seemed to do nothing. Everything is offset.

Any advice?

My goal: System Clock=Knoppmyth Local Time= Guide time = Real local time.

Author:  tjc [ Thu Mar 23, 2006 8:12 pm ]
Post subject: 

You can tell the system that the HW clock is set to local time. I forget the details, but searching for hwclock should turn it up.

Author:  jhub908 [ Thu Mar 23, 2006 9:29 pm ]
Post subject: 

i just dealt with this problem here's what i did.

reboot
set bios clock to correct time
use tzsetup to set time zone correctly
use date command, set to local time
type hwclock --localtime
type hwclock --systohc
(the rest may not be necessary but i did anyway)
use mythfilldatabase
reboot

hopefully it works for you too, if not maybe try another mythfilldatabase. good luck

Author:  infinitenothing [ Thu Mar 23, 2006 9:58 pm ]
Post subject: 

It's almost working. I set the timezone and I know the CPU clock is right (checked bios) but now the system time is off.

date -u //displays the correct local time

hwclock --localtime //displays the correct local time

hwclock --systohc //displays nothing but then immediately after if I run

hwclock --show //it shows the wrong time (8 hours off) It's almost as if

hwclock --localtime //won't stick

Author:  tjc [ Thu Mar 23, 2006 10:00 pm ]
Post subject: 

Are you doing this all as root? I'm pretty sure that every single one of these tells you that...
http://mysettopbox.tv/phpBB2/viewtopic. ... ht=hwclock
http://mysettopbox.tv/phpBB2/viewtopic. ... ht=hwclock
http://mysettopbox.tv/phpBB2/viewtopic. ... ht=hwclock
http://mysettopbox.tv/phpBB2/viewtopic. ... ht=hwclock

jhub908, no offense, but the ones he would have found by search are clearer and more detailed. Please, it's better to post a link to good existing directions, than put new and more confusing ones inline.

Author:  infinitenothing [ Thu Mar 23, 2006 10:02 pm ]
Post subject: 

I open an xterm, then "su" to root. My prompt is root@mythtv:/#

Author:  tjc [ Thu Mar 23, 2006 10:17 pm ]
Post subject: 

I almost reflexively use "su -" since it tends to avoid certain glitches.

The first thing to check is the file that it is supposed to change:
Code:
root@black2:/etc# cat adjtime
0.000041 1142653126 0.000000
1142653126
UTC

Looks like the same thing happens when I try it... (I normally keep my system clock in UTC, anything else is fighting against the systems expectations.) Maybe webmin will do the trick... Hmm... Doesn't look like it... Well if you can figure what the values in adjtime are you can probably fiddle it directly...

Of course if we read the man page we find
Quote:
--show Read the Hardware Clock and print the time on Standard Output.
The time shown is always in local time, even if you keep your
Hardware Clock in Coordinated Universal Time. See the --utc
option.


I'm going to stongly recommend reading the man page for hwclock to learn more...
Code:
man hwclock

Author:  infinitenothing [ Fri Mar 24, 2006 12:35 am ]
Post subject: 

So, from the looks of it, the only thing that one can change the system time to is the hardware time. MythTV thinks the system time is in UTC. hdclock thinks the system is in UTC because that's what it was last set to. The --localtime option is virtually cosmetic as far as I can tell. It doesn't change anything unless used with the set command and even then it's only observed by the hdclock program. There must be a way to tell MythTv that the hardware time is a local time like --localtime tells hdclock. I'll get back to it tomorrow. My last resort is just setting windows to UTC since it doesn't have to do recording. Or maybe I'll use some script to change the HD clock back and forth depending on the OS.

Author:  tjc [ Fri Mar 24, 2006 12:47 am ]
Post subject: 

Actually i think that the UTC in adjtime might be the key. it might be worth some more testing to see.

Author:  infinitenothing [ Fri Mar 24, 2006 5:25 pm ]
Post subject: 

Thanks for the help. I think adjtime is if the hw clock is running slow or fast (low battery?) I gave into UTC hardware clock and the guide has the correct time. Is there a more elegant way to stop the mythbackend than the kill command. I tried # mythbackend stop to no avail

Author:  tjc [ Fri Mar 24, 2006 8:04 pm ]
Post subject: 

As root run:
Code:
/etc/init.d/mythtv-backend stop

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/