diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-31 11:13:16 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-31 11:13:16 +0800 |
commit | e46108042c88db357d67d82184738f72ad76f4be (patch) | |
tree | 5aad0efd0f58aa6c547a786ed498262a91d5c4d6 | |
parent | e4041ce8c3d86e99d747c53012349baa83116d45 (diff) | |
download | gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar.gz gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar.bz2 gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar.lz gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar.xz gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.tar.zst gsoc2013-empathy-e46108042c88db357d67d82184738f72ad76f4be.zip |
Use g_date_time_new_from_unix_local() to read timestamps from logger
g_date_time_new_from_unix_local() reads a Unix timestamp (which is defined
to be in UTC) and sets the timezone for the GDateTime to be the local timezone.
Thus when we format it, we get times in local time.
g_date_time_new_from_unix_utc() is not correct, because it sets the timezone
to UTC.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=656189
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c index 6cdf22292..816013b73 100644 --- a/libempathy-gtk/empathy-log-window.c +++ b/libempathy-gtk/empathy-log-window.c @@ -1200,7 +1200,7 @@ get_parent_iter_for_message (TplEvent *event, GDateTime *date; gchar *body, *pretty_date; - date = g_date_time_new_from_unix_utc ( + date = g_date_time_new_from_unix_local ( tpl_event_get_timestamp (event)); pretty_date = g_date_time_format (date, @@ -1270,7 +1270,7 @@ log_window_append_chat_message (TplEvent *event, EmpathyStringParser *parsers; GString *msg; - date = g_date_time_new_from_unix_utc ( + date = g_date_time_new_from_unix_local ( tpl_event_get_timestamp (event)); pretty_date = g_date_time_format (date, "%X"); @@ -1347,7 +1347,7 @@ log_window_append_call (TplEvent *event, } } - started_date = g_date_time_new_from_unix_utc ( + started_date = g_date_time_new_from_unix_local ( tpl_event_get_timestamp (event)); pretty_date = g_date_time_format (started_date, |