Index: rb-metadata-gst.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/metadata/rb-metadata-gst.c,v
retrieving revision 1.58
diff -u -r1.58 rb-metadata-gst.c
--- rb-metadata-gst.c	17 Jan 2006 07:54:11 -0000	1.58
+++ rb-metadata-gst.c	22 Jan 2006 13:37:11 -0000
@@ -426,14 +426,38 @@
 	val = gst_tag_list_get_value_index (list, tag, 0);
 	newval = g_new0 (GValue, 1);
 	g_value_init (newval, type);
+
+	if (field == RB_METADATA_FIELD_DATE) {
+		const GDate *date;
+		gulong julian;
+
+		if (G_VALUE_TYPE (val) == GST_TYPE_DATE) 
+			printf("Of type GST_TYPE_DATE\n");
+		date = g_value_get_boxed (val);
+		printf("%s\n", gst_value_serialize (val));
+
+		if (date == NULL)
+			printf("Date is NULL\n");
+		julian = g_date_get_julian (date);
+		printf("Julian date: %lu\n", julian);
+		g_value_set_ulong (newval, julian);
+		//newval = g_date_get_julian (date);
+	}
+	else { 
 	if (!g_value_transform (val, newval)) {
-		
+
 		rb_debug ("Could not transform tag value type %s into %s",
 			  g_type_name (G_VALUE_TYPE (val)), 
 			  g_type_name (G_VALUE_TYPE (newval)));
 		g_value_unset (newval);
 		g_free (newval);
-		return;
+		return; 
+	}
+	else {
+		rb_debug ("Transforming tag value type %s into %s",
+			  g_type_name (G_VALUE_TYPE (val)), 
+			  g_type_name (G_VALUE_TYPE (newval)));
+	}
 	}
 
 	switch (type) {
