[tracker] tracker-extract-gstreamer: Assume UTC for dates



commit fe5da53ffad2086d7dd85627e8a67b694bbd1bce
Author: JÃrg Billeter <j bitron ch>
Date:   Tue Aug 2 16:28:57 2011 +0200

    tracker-extract-gstreamer: Assume UTC for dates
    
    GDate does not carry time zone information. Using local time does not
    make sense.

 src/tracker-extract/tracker-extract-gstreamer.c  |    3 ++-
 src/tracker-extract/tracker-extract-gupnp-dlna.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index a8c1996..f9e51fe 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -268,7 +268,8 @@ add_date_time_gst_tag (TrackerSparqlBuilder  *metadata,
 		}
 
 		if (ret) {
-			g_date_strftime (buf, sizeof (buf), "%Y-%m-%dT%H:%M:%S%z", date);
+			/* GDate does not carry time zone information, assume UTC */
+			g_date_strftime (buf, sizeof (buf), "%Y-%m-%dT%H:%M:%SZ", date);
 		}
 	}
 
diff --git a/src/tracker-extract/tracker-extract-gupnp-dlna.c b/src/tracker-extract/tracker-extract-gupnp-dlna.c
index db8aef4..65fcbe3 100644
--- a/src/tracker-extract/tracker-extract-gupnp-dlna.c
+++ b/src/tracker-extract/tracker-extract-gupnp-dlna.c
@@ -211,7 +211,8 @@ add_date_time_gst_tag (TrackerSparqlBuilder  *metadata,
 		}
 
 		if (ret) {
-			g_date_strftime (buf, sizeof (buf), "%Y-%m-%dT%H:%M:%S%z", date);
+			/* GDate does not carry time zone information, assume UTC */
+			g_date_strftime (buf, sizeof (buf), "%Y-%m-%dT%H:%M:%SZ", date);
 		}
 	}
 



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