[PATCH 08/11] podcasts: updated to new date format



---
 src/media/podcasts/grl-podcasts.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/media/podcasts/grl-podcasts.c b/src/media/podcasts/grl-podcasts.c
index 1855ce2..f2f9966 100644
--- a/src/media/podcasts/grl-podcasts.c
+++ b/src/media/podcasts/grl-podcasts.c
@@ -607,8 +607,14 @@ build_media (GrlMedia *content,
     }
 
     grl_media_set_id (media, url);
-    if (date)
-      grl_media_set_date (media, date);
+    if (date) {
+      time_t t;
+      GDateTime *date_time;
+      t = g_mime_utils_header_decode_date (date, NULL);
+      date_time = g_date_time_new_from_unix_utc (t);
+      grl_media_set_publication_date (media, date_time);
+      g_date_time_unref (date_time);
+    }
     if (desc)
       grl_media_set_description (media, desc);
     if (mime)
-- 
1.7.4.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]