[mythtv-users] Re: Timezones, wintertime & Timeoffset

Per Åge Sørvik peraage at leneogperaage.com
Mon Oct 27 14:52:03 EST 2003


Stefan Frank wrote:

>Per Åge Sørvik <peraage at leneogperaage.com> writes:
>
>  
>
>>Recently my country (Norway), switched to wintertime, adjusting the time
>>1 hour back. And suddenly, all my listings was 1 hour wrong. Not
>>    
>>
>
>Same here but without the off-by-one error. :)
>
>  
>
>>entirely unexpected, so i did a 'delete from program', and ran
>>mythfilldatabase again. Nope, same result. So i adjusted the TimeOffset
>>setting from +0200 to +0100. Still same result. Hmm, +0500 ? Same
>>result. NULL ? Same result. Clock has UTC set to false, and I'm running
>>mythfilldatabase from a different machine than the database/backend.
>>
>>So, does anybody know if this setting is used for anything ? If so, what
>>would be the correct procedure for using it ?
>>    
>>
>
>The TimeOffset only matters while running mythfilldatabase. It will
>compare this setting with the timezone spec in the xmltv files and, if
>they differ, adjust the program start/stop times accordingly.
>  
>

If you read what I wrote, changing the TimeOffset did nothing. I changed 
the timeoffset, deleted from the program table, and run mythfilldatabase 
again. No change at all. It doesn't have to to do with the actual moment 
of switching from summertime to wintertime. It has to do with all 
schedules after the change.  The results where the same whatever 
settings of TimeOffset. The program that should run at 2100 on Monday 
27. displayed as 2200, no matter changing the timeoffset.

>Assuming TimeOffset = +0200 if you run mythfilldatabase a few hours
>before switching to wintertime, the program data for programs running
>after the switch-over could be offset by one hour if your listings
>provider sets the timezones to +0200 or +0100 respectively.
>
>There's currently no way to avoid this to happen afaik. Except not to
>import program data 'for winter time' while it's still summer time and
>vice versa. Only if your provider completely ignores the timezone and
>always sets it to CET (like the provider i use does it), you'd be
>save with TimeOffset = +0100.
>  
>
Whatever I set TimeOffset to didn't alter the behaviour of 
mythfilldatabase at all. That can't be right. Changing the diff in 
"addTimeOffset" of mythfilldatabase.cpp  to -60, did however work. So 
that's what I did, even if it's a brute force hack that works for me. 
Here's a sample from the xml file where it specifies CET as the timezone.

<programme start="20031031170500 CET" stop="20031031173000 CET" 
showview="857986" channel="21.dagenstv.com">

-- 

peraage



More information about the mythtv-users mailing list