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



commit e95b454883bee2347e7db48c4e5b396dfe3db36e
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 c35359f..70c28a7 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -322,7 +322,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 6af134c..4c24350 100644
--- a/src/tracker-extract/tracker-extract-gupnp-dlna.c
+++ b/src/tracker-extract/tracker-extract-gupnp-dlna.c
@@ -235,7 +235,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]