Mercurial > pidgin.yaz
changeset 13160:1b48f0ec55e9
[gaim-migrate @ 15523]
It seems more correct to work in locale format for struct tm.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 07 Feb 2006 16:29:25 +0000 |
parents | d03013fd39bf |
children | 02268b52ced3 |
files | src/log.c |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/log.c Tue Feb 07 16:02:25 2006 +0000 +++ b/src/log.c Tue Feb 07 16:29:25 2006 +0000 @@ -89,7 +89,14 @@ #ifdef HAVE_STRUCT_TM_TM_ZONE /* XXX: This is so wrong... */ if (log->tm->tm_zone != NULL) - log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone); + { + char *tmp = g_locale_from_utf8(log->tm->tm_zone, -1, NULL, NULL, NULL); + if (tmp != NULL) + log->tm->tm_zone = (const char *)tmp; + else + /* Just shove the UTF-8 bytes in and hope... */ + log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone); + } #endif } log->logger = gaim_log_logger_get();