Use a more friendly format for the timestamp in the banlist.

Fri, 11 Jul 2008 06:35:32 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Fri, 11 Jul 2008 06:35:32 +0000
changeset 23582
5b97b0d87d34
parent 23581
d2473f86d6fa
child 23583
cbcdd573862d
child 23585
7b7739c29f86

Use a more friendly format for the timestamp in the banlist.
It's weird to compute time in millions of seconds.

libpurple/protocols/irc/msgs.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/irc/msgs.c	Tue Jul 08 17:50:25 2008 +0000
+++ b/libpurple/protocols/irc/msgs.c	Fri Jul 11 06:35:32 2008 +0000
@@ -215,10 +215,8 @@
 			/* This is an extended syntax, not in RFC 1459 */
 			int t1 = atoi(args[4]);
 			time_t t2 = time(NULL);
-			msg = g_strdup_printf(ngettext("Ban on %s by %s, set %ld second ago",
-						       "Ban on %s by %s, set %ld seconds ago",
-						       t2 - t1),
-			                      args[2], args[3], t2 - t1);
+			msg = g_strdup_printf(_("Ban on %s by %s, set %s ago"),
+			                      args[2], args[3], purple_str_seconds_to_string(t2 - t1));
 		} else {
 			msg = g_strdup_printf(_("Ban on %s"), args[2]);
 		}

mercurial