aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-location-manager.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-19 17:06:52 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-19 18:16:11 +0800
commit92af7e9f7c5f114963299fcf53b48b4ed86a2f7b (patch)
tree24fc4607cd492d777c2e1ee4a5f77a6381059fd8 /libempathy-gtk/empathy-location-manager.c
parent2d1ca4e5b9f7fdff7b1ea2d4fc31828d7dbbbae8 (diff)
downloadgsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar.gz
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar.bz2
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar.lz
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar.xz
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.tar.zst
gsoc2013-empathy-92af7e9f7c5f114963299fcf53b48b4ed86a2f7b.zip
Port all timestamps from time_t to gint64 (#648188)
Diffstat (limited to 'libempathy-gtk/empathy-location-manager.c')
-rw-r--r--libempathy-gtk/empathy-location-manager.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 1c09c358c..1925d4371 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -39,6 +39,7 @@
#include "libempathy/empathy-gsettings.h"
#include "libempathy/empathy-location.h"
#include "libempathy/empathy-utils.h"
+#include "libempathy/empathy-time.h"
#define DEBUG_FLAG EMPATHY_DEBUG_LOCATION
#include "libempathy/empathy-debug.h"
@@ -322,16 +323,12 @@ static void
update_timestamp (EmpathyLocationManager *self)
{
EmpathyLocationManagerPriv *priv= GET_PRIV (self);
- GValue *new_value;
- gint64 stamp64;
- time_t timestamp;
-
- timestamp = time (NULL);
- stamp64 = (gint64) timestamp;
- new_value = tp_g_value_slice_new_int64 (stamp64);
- g_hash_table_insert (priv->location, g_strdup (EMPATHY_LOCATION_TIMESTAMP),
- new_value);
- DEBUG ("\t - Timestamp: %" G_GINT64_FORMAT, stamp64);
+ gint64 timestamp;
+
+ timestamp = empathy_time_get_current ();
+ tp_asv_set_int64 (priv->location, EMPATHY_LOCATION_TIMESTAMP, timestamp);
+
+ DEBUG ("\t - Timestamp: %" G_GINT64_FORMAT, timestamp);
}
static void