Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#457 tv_sort incorrectly claims overlaps and errors

none
closed
Karl Dietz
5
2014-05-20
2011-10-22
Bruce Lilly
No

With times clearly in UTC, tv_sort incoorectly reports overlaps and errors, e.g.:

overlapping programmes on channel I34156.labs.zap2it.com:
Rachel's Favorite Food at Home at 20111030000000 +0000-|20111030003000 +0000
and Endless Feast at 20111030010000 +0000-|20111030013000 +0000
programme on channel I10035.labs.zap2it.com stops before it starts: 20111030003000 +0000, 20111030010000 +0000

Clearly from the times as shown, there is neither overlap nor start/stop discrepancy.

N.B. The UTC times reported are around where local politicians have decided to implement so-called "Daylight Savings Time" changes, but that should be irrelevant to tv_sort as the specified times are clearly in UTC, which has no such changes (N.B. "+0000").

UTC has been intentionally specified in the xmltv configuration specifically to avoud such issues, but despite tv_sort source line:

use Date::Manip; Date_Init('TZ=UTC');

tv_sort appears to be attempting to inappropriately impose time shifts.

Tested with xmltv versions 0.5.59 and 0.5.61 (no difference, which is unsurprising as filter/tv_sort is unchanged)

Discussion

  • Karl Dietz
    Karl Dietz
    2011-10-25

    I've just been looking at errors like that in other grabbers and tv_sort seemed to work correct. Can you attach a reduced sample? of just two programs that are reported as overlapping when they are not?

     
  • Karl Dietz
    Karl Dietz
    2011-10-25

    • assigned_to: nobody --> dekarl
    • status: open --> pending
     
  • Bruce Lilly
    Bruce Lilly
    2011-10-27

    input lines resulting in the example reported overlap in the original bug report:

    <programme start="20111030000000 +0000" stop="20111030003000 +0000" channel="I34156.labs.zap2it.com">
    <title lang="en">Rachel's Favorite Food at Home</title>
    <sub-title lang="en">Comfort Food</sub-title>
    <desc lang="en">Mediterranean pasta soup with basil pesto; cheese fondue; sausages with applesauce; banana butterscotch pudding.</desc>
    <date>20100626</date>
    <category lang="en">Cooking</category>
    <category lang="en">Series</category>
    <episode-num system="dd_progid">EP01250635.0009</episode-num>
    <episode-num system="onscreen">109</episode-num>
    <audio>
    <stereo>stereo</stereo>
    </audio>
    <previously-shown start="20100626000000" />
    <subtitles type="teletext" />
    </programme>
    <programme start="20111030010000 +0000" stop="20111030013000 +0000" channel="I34156.labs.zap2it.com">
    <title lang="en">Endless Feast</title>
    <sub-title lang="en">Boxford, Massachusetts</sub-title>
    <desc lang="en">Local farms provide root vegetables, squash and angus beef for a harvest supper.</desc>
    <date>20100522</date>
    <category lang="en">Cooking</category>
    <category lang="en">How-to</category>
    <category lang="en">House/garden</category>
    <category lang="en">Series</category>
    <episode-num system="dd_progid">EP00911740.0021</episode-num>
    <episode-num system="onscreen">208</episode-num>
    <audio>
    <stereo>stereo</stereo>
    </audio>
    <previously-shown start="20100522000000" />
    <subtitles type="teletext" />
    </programme>

    Thos are not even sequential programs; they are separated by:

    <programme start="20111030003000 +0000" stop="20111030010000 +0000" channel="I34156.labs.zap2it.com">
    <title lang="en">Katie Brown Workshop</title>
    <sub-title lang="en">Harvest</sub-title>
    <desc lang="en">No-carve pumpkins; roast turkey; wild rice stuffing with mushroom gravy; nutty caramel pumpkin pie.</desc>
    <credits>
    <presenter>Katie Brown</presenter>
    </credits>
    <date>20081004</date>
    <category lang="en">Home improvement</category>
    <category lang="en">House/garden</category>
    <category lang="en">How-to</category>
    <category lang="en">Series</category>
    <episode-num system="dd_progid">EP00819738.0061</episode-num>
    <episode-num system="onscreen">322</episode-num>
    <audio>
    <stereo>stereo</stereo>
    </audio>
    <previously-shown start="20081004000000" />
    <subtitles type="teletext" />
    </programme>

    Moreover, these are not near the local time zone (EST5EDT) change, which is scheduled to occur at 2011-11-06T06:00:00Z (ISO 8601:2004 format). [ Program listings around *that* time are, however, in the range covered by the complete input file]

     
  • Bruce Lilly
    Bruce Lilly
    2011-10-27

    • status: pending --> open
     
  • Karl Dietz
    Karl Dietz
    2011-11-11

    I don't find the issue, any help appreciated.

     
  • Geoff
    Geoff
    2013-10-21

    I can't replicate this (despite changed the dates to my current DST 'window') - is it still happening?

     
  • Geoff
    Geoff
    2014-04-06

    @Karl
    What version of Date::Manip are you running?

    I'm using 5.44 and don't get the problem with your reduced test case. From looking at cpan it seems the date parsing was rewritten for version 6 of this module and so may point to a difference?

     
  • Karl Dietz
    Karl Dietz
    2014-04-11

    Good point, I'm testing with Date::Manip 6.22,

     
  • Geoff
    Geoff
    2014-05-20

    This is due to a bug in Date::Manip which was fixed in Date::Manip version 6.30.

    VERSION 6.30  (2012-01-11)
        Bug fixes
            Fixed a bug where parsing some dates near / during a DST change
            failed.
    

     
    I can confirm this bug occurs in 6.22 and that it's gone away in 6.30.

    If using version 6.xx of Date::Manip you should upgrade to the latest version (currently 6.43).

     
  • Geoff
    Geoff
    2014-05-20

    • status: open --> closed
    • Group: --> none