[empathy] Send a int64 timestamp to match the spec



commit 30aa5cfac08630c0599088678a58f10389866221
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Tue Jan 13 01:02:03 2009 +0200

    Send a int64 timestamp to match the spec
---
 libempathy-gtk/empathy-location-manager.c |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index dde767d..d00bce7 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -271,17 +271,13 @@ update_timestamp (EmpathyLocationManager *location_manager,
   EmpathyLocationManagerPriv *priv;
   priv = GET_PRIV (location_manager);
   GValue *new_value;
-  gchar str_time [100];
-  time_t time = timestamp;
-  struct tm *ptm = gmtime (&time);
+  gint64 stamp64 = (gint64) timestamp;
 
-  if (strftime (str_time, 100, "%Y%m%dT%TZ", ptm) == 0)
-    return;
-
-  new_value = tp_g_value_slice_new (G_TYPE_STRING);
-  g_value_set_string (new_value, str_time);
-  g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_TIMESTAMP), new_value);
-  DEBUG ("\t - Timestamp: %s", str_time);
+  new_value = tp_g_value_slice_new (G_TYPE_INT64);
+  g_value_set_int64 (new_value, stamp64);
+  g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_TIMESTAMP),
+      new_value);
+  DEBUG ("\t - Timestamp: %" G_GINT64_FORMAT, stamp64);
 }
 
 #if HAVE_GEOCLUE



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