From 1b85349b3f5883f2861df04dd0bc334dba97f257 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 29 Oct 2007 23:49:00 +0000 Subject: [PATCH] ensure dates in the torrent inspector are readable by converting them from the system's locale to UTF-8. (bug found and patched by goyko, ticket #435) --- gtk/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtk/util.c b/gtk/util.c index 2c0092e56..0bc8e7b3e 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -114,11 +114,11 @@ readabletime(int secs) { char * rfc822date (guint64 epoch_msec) { - const time_t secs = epoch_msec / 1000; - const struct tm tm = *localtime (&secs); - char buf[128]; - strftime (buf, sizeof(buf), "%a, %d %b %Y %T %Z", &tm); - return g_strdup (buf); + const time_t secs = epoch_msec / 1000; + const struct tm tm = *localtime (&secs); + char buf[128]; + strftime( buf, sizeof(buf), "%a, %d %b %Y %T %Z", &tm ); + return g_locale_to_utf8( buf, -1, NULL, NULL, NULL ); } char *