Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.77
diff -u -r1.1.2.12.2.77 apachesolr.module
--- apachesolr.module	17 Dec 2008 18:35:04 -0000	1.1.2.12.2.77
+++ apachesolr.module	18 Dec 2008 08:16:43 -0000
@@ -476,7 +476,7 @@
     $document->body = strip_tags($text);
     $document->type  = $node->type;
     $document->type_name = node_get_types('name', $node);
-    $document->changed = $node->changed;
+    $document->changed = apachesolr_date_iso($node->changed);
     $document->comment_count = $node->comment_count;
     $document->name = apachesolr_strip_ctl_chars($node->name);
     $document->language = $node->language;
@@ -531,6 +531,22 @@
 }
 
 /**
+ * Convert date from timestamp into ISO 8601 format.
+ * http://lucene.apache.org/solr/api/org/apache/solr/schema/DateField.html
+ */
+function apachesolr_date_iso($date_timestamp) {
+  return date('Y-m-d\TH:i:s\Z', $date_timestamp);
+}
+
+/**
+ * Convert date from ISO 8601 format into timestamp.
+ */
+function apachesolr_date_timestamp($date_iso) {
+  return strtotime($date_iso);
+}
+
+
+/**
  * Extract taxonomy from $node and add to dynamic fields.
  */
 function apachesolr_add_taxonomy_to_document(&$document, $node) {
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.49
diff -u -r1.1.2.6.2.49 apachesolr_search.module
--- apachesolr_search.module	17 Dec 2008 18:35:04 -0000	1.1.2.6.2.49
+++ apachesolr_search.module	18 Dec 2008 07:41:24 -0000
@@ -237,7 +237,7 @@
               'type' => node_get_types('name', $doc),
               'title' => $doc->title,
               'user' => theme('username', $doc),
-              'date' => $doc->changed,
+              'date' => apachesolr_date_timestamp($doc->changed),
               'node' => $doc,
               'extra' => $extra,
               'score' => $doc->score,
Index: schema.xml
===================================================================
RCS file: /cvs/drupal/contributions/modules/apachesolr/schema.xml,v
retrieving revision 1.1.2.1.2.17
diff -u -r1.1.2.1.2.17 schema.xml
--- schema.xml	16 Dec 2008 15:52:41 -0000	1.1.2.1.2.17
+++ schema.xml	18 Dec 2008 07:11:29 -0000
@@ -253,7 +253,7 @@
    <field name="path" type="text" indexed="true" stored="true" termVectors="true"/>
    <field name="uid"  type="integer" indexed="true" stored="true"/>
    <field name="name" type="text" indexed="true" stored="true" termVectors="true"/>
-   <field name="changed" type="integer" indexed="true" stored="true"/>
+   <field name="changed" type="date" indexed="true" stored="true"/>
    <field name="nid"  type="integer" indexed="true" stored="true"/>
    <field name="status" type="integer" indexed="true" stored="true"/>
    <field name="comment_count" type="integer" indexed="true" stored="true"/>
Index: contrib/apachesolr_attachments/apachesolr_attachments.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/apachesolr/contrib/apachesolr_attachments/apachesolr_attachments.module,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 apachesolr_attachments.module
--- contrib/apachesolr_attachments/apachesolr_attachments.module	9 Dec 2008 19:21:28 -0000	1.1.2.8
+++ contrib/apachesolr_attachments/apachesolr_attachments.module	18 Dec 2008 07:50:28 -0000
@@ -127,7 +127,7 @@
           $document->hash = $hash;
           $document->nid = $node->nid;
           $document->title = $file->filename; 
-          $document->changed = $node->changed;
+          $document->changed = apachesolr_date_iso($node->changed);
           $document->uid = $node->uid;
           $document->name = $node->name;
           $document->body = $text;

