src/log.c

changeset 13161
8f84bea3949f
parent 13160
8177a80d9e27
child 13163
2026e49825df
equal deleted inserted replaced
13160:8177a80d9e27 13161:8f84bea3949f
87 *(log->tm) = *tm; 87 *(log->tm) = *tm;
88 88
89 #ifdef HAVE_STRUCT_TM_TM_ZONE 89 #ifdef HAVE_STRUCT_TM_TM_ZONE
90 /* XXX: This is so wrong... */ 90 /* XXX: This is so wrong... */
91 if (log->tm->tm_zone != NULL) 91 if (log->tm->tm_zone != NULL)
92 log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone); 92 {
93 char *tmp = g_locale_from_utf8(log->tm->tm_zone, -1, NULL, NULL, NULL);
94 if (tmp != NULL)
95 log->tm->tm_zone = (const char *)tmp;
96 else
97 /* Just shove the UTF-8 bytes in and hope... */
98 log->tm->tm_zone = (const char *)g_strdup(log->tm->tm_zone);
99 }
93 #endif 100 #endif
94 } 101 }
95 log->logger = gaim_log_logger_get(); 102 log->logger = gaim_log_logger_get();
96 if (log->logger && log->logger->create) 103 if (log->logger && log->logger->create)
97 log->logger->create(log); 104 log->logger->create(log);

mercurial