View Full Version : UK Timezone change not handled in TyTool/tserver_mfs7?
philips
10-27-2003, 06:56 AM
Hi, we have just changed over from BST (GMT+01) to GMT in the UK.
Yesterday I was extracting streams from my Tivo without error.
This morning, probably after the Tivo service call, I tried to get the NowShowing list with TyTool and I got the following error on the Tivo:
bash-2.02# ./tserver_mfs7
Doing the Lowest PriorityFix...
Priority set...
Waiting for an incomming connection!
SERVER: We got a message! buf = 'SHOWING'
syntax error in expression "*60*60"
while executing
"expr $tz*60*60"
(procedure "get_tzoffset" line 31)
invoked from within
"get_tzoffset $setuptz $daylightsavings"
(procedure "init_db" line 54)
invoked from within
"init_db"
(file "./NowShowing.tcl" line 468)
Waiting for an incomming connection!
The file NowShowing.tcl is in the same directory as tserver_mfs7 and I have also tried with the -s option.
Also, I have tried restarting the Tivo and got the same result.
Is there a problem with timezone handling?
philips
10-27-2003, 07:14 AM
Just been looking through NowShowing.tcl from the tserver_mfs7 release.
I have no understanding of tcl or whatever it is written in, but the first 'if' statement and how $mfstz is being handled doesn't seem right (<0, later subtracting 1 from it to use as an index).
Also, the tzlist looks mixed up.
proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}
if { $dst == 2 || $dst == "" } {
Just my tuppence worth. please ignore if irrelevant.
sanderton
10-27-2003, 08:42 AM
TiVoWeb has issue with the BST change, and I wouldn't be surprised if nowPlaying.tcl inherited them. You can fix TiVoWeb simply by restarting it - maybe that will work here too?
sanderton
10-27-2003, 08:49 AM
Looking at the code:
proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}
This will fail to assign a valid value to tz (which is the error) if mfstz is zero. However it looks like mfstz should be 7 for a UK machine.
am3n3
10-28-2003, 09:53 AM
This thread addresses a similar issue:
http://www.dealdatabase.com/forum/showthread.php?threadid=18811&highlight=%24mfstz
As mentioned on that thread, TyTool generates the same error message iswhen calling get_tzoffset. A few ppl explain how to change a line of code so that $mfstz is a non-zero value.
I rebooted my tivo & tivoweb last night when I discovered my mfsstream no longer worked, but the reboot didn't help. I'll try editing nowshowing.tcl and upload it and see if mfsstream will work again.
sanderton
10-29-2003, 10:38 AM
The version of ui.itcl which is in the current version of TiVoWeb makes one change to the code in that proc:
if { $mfstz <= 0 } {
which fixes it.
philips
10-29-2003, 12:19 PM
Still no luck.
I managed to get some debug output:
The OS version is identified as 2 in main,
<PROC whatever main() is in tcl>
ready
init_db: We are version 2
then init_db gets null strings for Timezone and DaylightSavings.
This is a different code path from version 3, so maybe that works fine.
<PROC init_db>
<setuptz>=<>
<daylightsavings>=<>
Then in get_tzoffset it can't cope with the null string for $mfstz, so I changed the test to
if $mfstz != ""
and then more output shows nothing can be assigned from the list.
<PROC get_tzoffset>
<mfstz>=<>(something?)
<tz>=<>(from the list?)
<tzlist>=<-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 -11
-10 -9 -8>
Finally, I have hardcoded the timezone to 0 immediately after the if {} else{} block as suggested in the thread referenced in a post above.
<tz>=<0>
then it works. But I guess the times will be out by 1 hour next Spring!!
sanderton
10-29-2003, 12:32 PM
In TiVoWeb, blank daylightsavings get set to 2 and setuptz to 0 - which are the right values in teh UK. Tf you change your hard coding to that then you should be fine when the clocks go forward again.
philips
10-29-2003, 02:01 PM
Thank you.
You have been most helpful. I am a happy man now.
TIVONET_Y
11-04-2003, 10:16 AM
No matter what I do I can't get Tytool to work again after the clock changes.
Philips or Sanderton, is there any chance of you sending
me a copy of your working NowShowing.tcl?
Thanks
Pete
philips
11-04-2003, 04:03 PM
Hello Tivonet_y,
here is the NowShowing.tcl from my Tivo.
It is just a hack for now, but I can put in a better fix to cope with the timechanges later.
I think it is attached to this post - I have never done this before.
philips
11-04-2003, 04:04 PM
oh, and I checked it was still working onmy tivo before posting it.
TIVONET_Y
11-04-2003, 05:05 PM
Philips,
Many many thanks for this. It is now working fine again.
Much appreciated.
Pete
smokie
11-03-2004, 01:31 PM
Now that we have changed to GMT, I am getting the same problem as here.
I have downloaded the nowshowing.tcl module above but am 1) wondering if there is a later version of everything which I should have and 2) where the hell nowshowing.tcl belongs, as I don't see it in my hacks folder.
Any advice would be appreciated.
Hello Tivonet_y,
here is the NowShowing.tcl from my Tivo.
It is just a hack for now, but I can put in a better fix to cope with the timechanges later.
I think it is attached to this post - I have never done this before.
I've ftpd (as binary) this to my /var/hacks and done chmodded it to 777
However - now I get a different error message when I try and grab a Now Showing listing:
Telneting to the TIVO...
Connecting to '192.168.0.250'
Connected...
We got 'bash-2.02# ' which is the prompt!
bash-2.02# /var/hack/tserver_mfs7 -s /var/hack/NowShowing.tcl
Doing the Lowest PriorityFix...
Priority set...
Waiting for an incomming connection!
SERVER: We got a message! buf = 'SHOWING'
couldn't open "/var/hack/tserver/debug.txt": no such file or directory
while executing
"open "/var/hack/tserver/debug.txt" w"
(file "/var/hack/NowShowing.tcl" line 473)
Waiting for an incomming connection!
Can anybody suggest anything here?
Gil
smokie
11-19-2004, 04:14 AM
I should have returned to say I'd fixed my problem. I didn't have the new NowShowing in the same directory as tserver.
However I then had the same problem as you Gil. I'm pretty sure that all I did was create the right directory as listed in the error and Voila!
That is, under /var/hack, type mkdir tserver
The debug.txt can then be written when the program needs it
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.