Had problems with time offset in xmltv (1 Viewer)

jojjal

Portal Pro
October 21, 2006
63
0
Home Country
Sweden Sweden
I had some problems with time offset´s in XMLTV, as it was showing the time
+0200 ahead, and in that way messing my epg up.

If I download a egp for 14 days it had over 10.000 shows that was 2 H offset, and manually edit the xml file was not an opiton. First I tried with the replase funktion in Notepad but it would just hang after a few changes..(btw it would surten have take about 12 weeks to change the whole file..)

I found a script that change all instanses that was wrong for me in just a "blink of an eye"...

Whit this code it chan replase just anything...

Code:
Const ForReading = 1
Const ForWriting = 2

strFileName = Wscript.Arguments(0)
strOldText = Wscript.Arguments(1)
strNewText = Wscript.Arguments(2)

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, ForReading)

strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, strOldText, strNewText)

Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
objFile.WriteLine strNewText
objFile.Close

argumente to run it in my case is

Code:
cscript test.vbs "C:\ut\tvguide.xml" "+0200" "+0000"
as the first is what it is in the file, and second what it would change to...

This is a shourt cut for me...

//Johan
 

jojjal

Portal Pro
October 21, 2006
63
0
Home Country
Sweden Sweden
The build i had of TV3 (when i found this script) didn´t respond to any commands in the time offsett feture.... so no im using a schedule for downloading and changing the time zone.... and moving it to the right folder....

It may be funktion in newer builds... have not tested.

(//Johan
 

MediaTobiPortal

Portal Pro
December 13, 2004
206
6
126
I can confirm that timezone comensation within xmltv plugin of TV-Engine V3 does NOT work !

I´m just testing your vb-skript, which seems to work.....

Thanks Tobi
 

GSteele

Portal Pro
April 6, 2006
74
0
Hi,

A couple of clues to the "new" possibly intended behavoiur of the time zone compensation.
The time zone compensation now also seems to take into account your own regional settings. In my case to get it to work I had to leave the adjust time zone flag ticked but leave the offset at 0. This was due to my xmltv file having the epg with GMT time even though I live in Australia where my time zone is GMT +10. So having the time zone comp flag ticked meant that the importer seemed to note the program at 0100 +0000 ie 1am GMT then the importer must look at my regional timezone GMT +10 and import it as an 11am program. It took me a fair bit or fiddling as I didn't even consider it was using my regional settings. I tried with time shift on +10 and wound up at GMT +20 ie 10hrs ahead tried with timezone comp off and was 10hours behind so I finally tried with timezone comp on but 0 hours and all was fine.

I guess this was done for people that are receiving programs broadcast in different timezones so then your epg can have several timezones in the file for different channels but the importer can recalc to the local timezone of your PC to allow recording. This will work better than a straight add 10hours to GMT setting as it allows your EPG to have mutliple timezones converted to a single current time rather than a simplistic time shift which would mangle the timezones as we are(were) all experienceing.

I hope this helps.

Basically set TimeZone Compensation = Yes and let your PC's time zone do the work if you have TZ in your TVGuide.xml file.

I'm pretty sure this should fix your troubles.

Thanks

Greg Steele
 

SwissBuster

Portal Pro
June 27, 2008
229
4
Geneva, Switzerland
Home Country
Switzerland Switzerland
The time zone compensation now also seems to take into account your own regional settings.

I had the same issue with a 2 hour WE offset. I also noticed from the logs that the grabber now seems to apply a timezone compensation based on your regional settings. So, after several failed attempts to change the 2 hour offset, the solution for me was to simply uncheck the 'apply time compensation' box in TV config.

It now seems to be working fine for all channels, even though I have TV programs from the UK and central Europe, ie across two different time zones.
 

Users who are viewing this thread

Top Bottom