diff options
Diffstat (limited to 'rhautoimport-gd')
-rwxr-xr-x | rhautoimport-gd | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rhautoimport-gd b/rhautoimport-gd index 99dc63b..698e8e3 100755 --- a/rhautoimport-gd +++ b/rhautoimport-gd @@ -117,8 +117,13 @@ for my $entry ($feed->entries) { next unless $entry->enclosure; my $entry_bdt = $entry->{'entry'}{'https://cba.fro.at/help#feeds'}{'broadcastDate'}; + my $format_string = "%a, %d %b %Y %H:%M:%S"; + unless (defined $entry_bdt) { + $entry_bdt = $entry->{'entry'}{'https://cba.fro.at/help#feeds'}{'productionDate'}; + $format_string = "%a, %d %b %Y"; + } next unless (defined $entry_bdt); - my $bdt = DateTime::Format::Strptime::strptime("%a, %d %b %Y", $entry_bdt); + my $bdt = DateTime::Format::Strptime::strptime($format_string, $entry_bdt); next unless($broadcast_date[0] == $bdt->year && $broadcast_date[1] == $bdt->month && $broadcast_date[2] == $bdt->day); |