changeset 25654:150282919040

Actually display the buddy's local time.
author Paul Aurich <paul@darkrain42.org>
date Sun, 08 Feb 2009 08:12:19 +0000
parents 45c33d60c547
children c2cb082f5f2f
files libpurple/protocols/jabber/buddy.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Sun Feb 08 08:00:31 2009 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Sun Feb 08 08:12:19 2009 +0000
@@ -809,7 +809,7 @@
 			now_t += jbr->tz_off;
 			now = gmtime(&now_t);
 
-			purple_notify_user_info_add_pair(user_info, _("Local Time"), purple_time_format(now));
+			purple_notify_user_info_prepend_pair(user_info, _("Local Time"), purple_time_format(now));
 		}
 		if(jbir) {
 			if(jbir->idle_seconds > 0) {
@@ -988,7 +988,7 @@
 				now_t += jbr->tz_off;
 				now = gmtime(&now_t);
 
-				purple_notify_user_info_add_pair(user_info, _("Local Time"), purple_time_format(now));
+				purple_notify_user_info_prepend_pair(user_info, _("Local Time"), purple_time_format(now));
 			}
 
 			if(jbr->name && (jbir = g_hash_table_lookup(jbi->resources, jbr->name))) {
@@ -1683,8 +1683,8 @@
 	if (resource_name && jbr) {
 		if (type && !strcmp(type, "result")) {
 			xmlnode *time = xmlnode_get_child(packet, "time");
-			xmlnode *tzo = time ? xmlnode_get_child(packet, "tzo") : NULL;
-			xmlnode *utc = time ? xmlnode_get_child(packet, "utc") : NULL;
+			xmlnode *tzo = time ? xmlnode_get_child(time, "tzo") : NULL;
+			xmlnode *utc = time ? xmlnode_get_child(time, "utc") : NULL;
 			if (tzo && utc) {
 				char *timestamp = g_strdup_printf("%s %s",
 				        xmlnode_get_data(utc), xmlnode_get_data(tzo));