mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
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)
This commit is contained in:
10
gtk/util.c
10
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 *
|
||||
|
||||
Reference in New Issue
Block a user