File: 01_atom_date.patch

package info (click to toggle)
libxml-feed-perl 0.43%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 308 kB
  • ctags: 105
  • sloc: perl: 924; xml: 450; sh: 22; makefile: 16
file content (16 lines) | stat: -rw-r--r-- 586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Author: <gregor+debian@comodo.priv.at>
Description: fix problems with dates in XML::Feed:Atom;
Cf. #380498
--- a/lib/XML/Feed/Format/Atom.pm
+++ b/lib/XML/Feed/Format/Atom.pm
@@ -260,7 +260,9 @@
     if (@_) {
         $entry->{entry}->issued(DateTime::Format::W3CDTF->format_datetime($_[0])) if $_[0];
     } else {
-        $entry->{entry}->issued ? iso2dt($entry->{entry}->issued) : undef;
+        return iso2dt($entry->{entry}->issued) if $entry->{entry}->issued;
+        return iso2dt($entry->{entry}->published) if $entry->{entry}->published;
+        return undef;
     }
 }