changeset 20435:f0bc92602072

Parse the message timestamp using purple_str_to_time. I haven't been able to test this yet, it may need some timezone/dst offsets fixing.
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 26 May 2007 15:44:48 +0000
parents 998f9b5c8c8d
children ad481ea028be
files libpurple/protocols/msn/oim.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/oim.c	Sat May 26 15:21:33 2007 +0000
+++ b/libpurple/protocols/msn/oim.c	Sat May 26 15:44:48 2007 +0000
@@ -419,6 +419,7 @@
 	int has_nick = 0;
 	char *passport_str, *passport;
 	char *msg_id;
+	time_t stamp;
 
 	message = msn_message_new(MSN_MSG_UNKNOWN);
 
@@ -449,8 +450,9 @@
 	g_free(passport_str);
 	purple_debug_info("MaYuan","oim Date:{%s},passport{%s}\n",date,passport);
 
-	/* XXX: TODO: set the time from date */
-	serv_got_im(oim->session->account->gc, passport, decode_msg, 0, time(NULL));
+	stamp = purple_str_to_time(date, TRUE, NULL, NULL, NULL);
+
+	serv_got_im(oim->session->account->gc, passport, decode_msg, 0, stamp);
 
 	/*Now get the oim message ID from the oim_list.
 	 * and append to read list to prepare for deleting the Offline Message when sign out