diff src/gtkdebug.c @ 13104:e1e5462b7d81

[gaim-migrate @ 15466] Rework lots of date parsing. I either introduced a whole lot of bugs, or I've made sure all dates are localized properly now. Only time will tell which it is... ;) committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 19:50:51 +0000
parents 69b3d5cbd2b1
children fcde3faa1f57
line wrap: on
line diff
--- a/src/gtkdebug.c	Thu Feb 02 19:39:12 2006 +0000
+++ b/src/gtkdebug.c	Thu Feb 02 19:50:51 2006 +0000
@@ -212,8 +212,6 @@
 	DebugWindow *win = (DebugWindow *)user_data;
 	FILE *fp;
 	char *tmp;
-	time_t now = time(NULL);
-	char date[64];
 
 	if ((fp = g_fopen(filename, "w+")) == NULL) {
 		gaim_notify_error(win, NULL, _("Unable to open file."), NULL);
@@ -221,8 +219,7 @@
 	}
 
 	tmp = gtk_imhtml_get_text(GTK_IMHTML(win->text), NULL, NULL);
-	strftime(date, sizeof(date), "%c", localtime(&now));
-	fprintf(fp, "Gaim Debug Log : %s\n", date);
+	fprintf(fp, "Gaim Debug Log : %s\n", gaim_date_format_full(time(NULL)));
 	fprintf(fp, "%s", tmp);
 	g_free(tmp);
 
@@ -958,10 +955,10 @@
 	 * not NULL.  Why the hell do we do that?  --Mark
 	 */
 	if ((category != NULL) && (timestamps)) {
-		gchar mdate[64];
+		const char *mdate;
 
 		time_t mtime = time(NULL);
-		strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
+		mdate = gaim_utf8_strftime("%H:%M:%S", localtime(&mtime));
 		ts_s = g_strdup_printf("(%s) ", mdate);
 	} else {
 		ts_s = g_strdup("");