Index: libsoup/soup-date.c
===================================================================
--- libsoup/soup-date.c	(revision 1153)
+++ libsoup/soup-date.c	(working copy)
@@ -566,6 +566,22 @@
 }
 
 /**
+ * soup_date_to_timeval:
+ * @date: a #SoupDate
+ * @time: a #GTimeVal structure in which to store the converted time.
+ *
+ * Converts @date to a #GTimeVal.
+ */
+void
+soup_date_to_timeval (SoupDate *date, GTimeVal *time)
+{
+	/* FIXME: offset, etc */
+
+	time->tv_sec = rata_die_day (date) - TIME_T_EPOCH_RATA_DIE_DAY;
+	time->tv_sec = ((((time->tv_sec * 24) + date->hour) * 60) + date->minute) * 60 + date->second;
+}
+
+/**
  * soup_date_is_past:
  * @date: a #SoupDate
  *
Index: libsoup/soup-date.h
===================================================================
--- libsoup/soup-date.h	(revision 1153)
+++ libsoup/soup-date.h	(working copy)
@@ -51,6 +51,8 @@
 char     *soup_date_to_string       (SoupDate       *date,
 				     SoupDateFormat  format);
 time_t    soup_date_to_time_t       (SoupDate       *date);
+void      soup_date_to_timeval      (SoupDate       *date,
+				     GTimeVal       *time);
 
 gboolean  soup_date_is_past         (SoupDate       *date);
 
