Changeset 24 for shepherd

Show
Ignore:
Timestamp:
10/04/06 19:50:51 (7 years ago)
Author:
lincoln
Message:

oztivo xmltv data isn't inserting timezone into start/stop records. add workaround in shepherd to deal with it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • shepherd

    r19 r24  
    270270 
    271271        my $strptime = new DateTime::Format::Strptime( pattern => "%Y%m%d%H%M %z"); 
     272        my $alt_strptime = new DateTime::Format::Strptime( pattern => "%Y%m%d%H%M"); # alternate format 1: oztivo doesn't seem to output timezone 
    272273        my $seen_channels_with_data = 0; 
    273274 
     
    281282 
    282283                my $t1 = $strptime->parse_datetime($prog->{start}); 
     284                $t1 = $alt_strptime->parse_datetime($prog->{start}) if (!$t1); 
     285 
    283286                my $t2 = $strptime->parse_datetime($prog->{stop}); 
     287                $t2 = $alt_strptime->parse_datetime($prog->{stop}) if (!$t2); 
     288 
    284289                next if (!$t1 || !$t2); # if we can't parse stop/start then clearly THIS data is bunk! 
    285290