Index: modules/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator.module,v
retrieving revision 1.182
diff -u -r1.182 aggregator.module
--- modules/aggregator.module   2 Jun 2004 19:01:40 -0000       1.182
+++ modules/aggregator.module   15 Jun 2004 23:26:37 -0000
@@ -426,11 +426,28 @@
     if ($timestamp < 0) {
       /*
       ** The Dublin core's default data format uses ISO 8601 which can't
-      ** be parsed directly using PHP's strtotime().  It is not the only
-      ** valid format so this might fail nonetheless ...
+      ** be parsed directly using PHP's strtotime(). First, we grab just
+      ** the stuff that should be in a date - up to the minutes. Then,
+      ** we attempt to grab the seconds, and finally, the timezone.
       */
-      list($year, $month, $day, $hour, $minute, $second) = sscanf($date, '%4d-%2d-%2dT%2d:%2d:%2d');
-      $timestamp = strtotime("$year-$month-$day $hour:$minute:$second");
+      list($year, $month, $day, $hour, $minute) = sscanf($date, '%4d-%2d-%2dT%2d:%2d');
+      list($junk, $junk, $seconds) = sscanf($date, 'T%2d:%2d:%2d');
+      preg_match('([+-]\d{2}:\d{2})', $date, $timezone);
+      $timezone = $timezone[0];
+
+      // if there's no seconds, zero it out.
+      if (!$seconds) { $seconds = "00"; } 
+
+      // if there's a timezone, we remove the colon to make
+      // it readable by strtotime. no timezone, no string.
+      if ($timezone) {
+        $timezone = preg_replace('/:/', '', $timezone);
+      }
+      else {
+        $timezone = "";
+      }
+
+      $timestamp = strtotime("$year-$month-$day $hour:$minute:$seconds$timezone");
     }