]> git.mjollnir.org Git - s9y.git/commitdiff
fix time parser
authorgarvinhicking <garvinhicking>
Tue, 15 Nov 2005 13:55:04 +0000 (13:55 +0000)
committergarvinhicking <garvinhicking>
Tue, 15 Nov 2005 13:55:04 +0000 (13:55 +0000)
docs/NEWS
include/admin/importers/generic.inc.php

index 96b3e7c7b120c14b46c5ee943e7edc6fb64ddf8c..a8281ec5c1321b30a45634e0053150dda53e1e74 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 0.9.1 ()
 ------------------------------------------------------------------------
 
+    * Fix RSS import's timezone detection for ISO-8601 dates
+      (garvinhicking)
+
     * Fix htmlarea when using UTF-8 charset on a ISO-8859-1 language
       (garvinhicking)
          
index e22369ca9a52e234fda5bfdcc5c0960a535c5695..cefe5d99d94264e38ec4c13136947e486088b1d4 100644 (file)
@@ -92,7 +92,7 @@ class Serendipity_Import_Generic extends Serendipity_Import {
         if ($entry['timestamp'] == -1) {
             // strtotime does not seem to parse ISO 8601 dates
             if (preg_match('@^([0-9]{4})\-([0-9]{2})\-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})[\-\+]([0-9]{2}):([0-9]{2})$@', isset($item['pubdate']) ? $item['pubdate'] : $item['dc:date'], $timematch)) {
-                $entry['timestamp'] = mktime($timematch[4] - $timematch[7], $timematch[5] - $timematch[8], $timematch[6], $timematch[3], $timematch[2], $timematch[1]);
+                $entry['timestamp'] = mktime($timematch[4] - $timematch[7], $timematch[5] - $timematch[8], $timematch[6], $timematch[2], $timematch[3], $timematch[1]);
             } else {
                 $entry['timestamp'] = time();
             }