aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-location-manager.c
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-01-13 07:02:03 +0800
committerPierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>2009-06-01 23:35:30 +0800
commit30aa5cfac08630c0599088678a58f10389866221 (patch)
treea138f8485159e3ea7c3b46e272bfbfb9b18d7ae3 /libempathy-gtk/empathy-location-manager.c
parent0f9d947f490d741172aad78df2820c25b4e45a5c (diff)
downloadgsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar.gz
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar.bz2
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar.lz
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar.xz
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.tar.zst
gsoc2013-empathy-30aa5cfac08630c0599088678a58f10389866221.zip
Send a int64 timestamp to match the spec
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r--libempathy-gtk/empathy-location-manager.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index dde767d0d..d00bce7b8 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