MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » General Forums » OffTopic


OffTopic All topics which are not about MediaPortal go in here. Anything goes, as long as we keep it nice.

Reply
 
Thread Tools Display Modes
Old 2007-04-09, 22:21   #1 (permalink)
Portal Member
 
Join Date: Oct 2006
Age: 38
Posts: 61
Thanks: 4
Thanked 0 Times in 0 Posts

Country:

My System

Default Had problems with time offset in xmltv

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 is offline   Reply With Quote
Old 2007-04-13, 10:49   #2 (permalink)
Portal Member
 
mrkaras's Avatar
 
Join Date: Dec 2006
Posts: 350
Thanks: 2
Thanked 0 Times in 0 Posts

Country:

My System

Default

Can't you just change the time offset in mediaportal setup?
mrkaras is offline   Reply With Quote
Old 2007-04-13, 14:07   #3 (permalink)
Portal Member
 
Join Date: Oct 2006
Age: 38
Posts: 61
Thanks: 4
Thanked 0 Times in 0 Posts

Country:

My System

Default

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
jojjal is offline   Reply With Quote
Old 2007-05-03, 15:31   #4 (permalink)
Portal Member
 
MediaTobiPortal's Avatar
 
Join Date: Dec 2004
Posts: 185
Thanks: 0
Thanked 1 Time in 1 Post

My System

Default

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
MediaTobiPortal is offline   Reply With Quote
Old 2007-05-14, 03:09   #5 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 69
Thanks: 3
Thanked 0 Times in 0 Posts


Default

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
__________________
Greg Steele
GSteele is offline   Reply With Quote
Reply

Bookmarks

Tags
offset, time, xmltv

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Time offset in Xmltv jojjal xmlTV 4 2007-05-24 04:57
Time offset in program guide using EPG rkrichard WebEPG 2 2006-07-30 17:38
Time zones in xmltv mj_wood WebEPG 17 2006-03-29 23:37
Changing the time in XMLTV jackpetty Installation, configuration support 1 2006-02-05 23:04
Need help with xmltv time Offset primetime General Support 2 2005-10-26 18:50


All times are GMT +1. The time now is 04:21.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden