]> git.wh0rd.org - tt-rss.git/commitdiff
fix magpie w3cdtf parsing (closes #110)
authorAndrew Dolgov <fox@bah.spb.su>
Tue, 12 Sep 2006 16:50:57 +0000 (17:50 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Tue, 12 Sep 2006 16:50:57 +0000 (17:50 +0100)
magpierss/rss_utils.inc

index 2a29e72a9696598bd8f1eca21aa4f955ebf4b243..86fbdc829d4bbacdb52648118323080ba13ef740 100644 (file)
@@ -29,13 +29,13 @@ function parse_w3cdtf ( $date_str ) {
     
     if ( preg_match( $pat, $date_str, $match ) ) {
         list( $year, $month, $day, $hours, $minutes, $seconds) = 
     
     if ( preg_match( $pat, $date_str, $match ) ) {
         list( $year, $month, $day, $hours, $minutes, $seconds) = 
-            array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[6]);
+            array( $match[1], $match[2], $match[3], $match[4], $match[5], $match[7]);
         
         # calc epoch for current date assuming GMT
         $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
         
         $offset = 0;
         
         # calc epoch for current date assuming GMT
         $epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
         
         $offset = 0;
-        if ( $match[10] == 'Z' ) {
+        if ( $match[11] == 'Z' ) {
             # zulu time, aka GMT
         }
         else {
             # zulu time, aka GMT
         }
         else {