changeset 13116:0651b6008120

[gaim-migrate @ 15478] Use gaim_utf8_strftime() in gaim_str_sub_away_formatters(). Should these format strings be localized? committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sat, 04 Feb 2006 00:06:34 +0000
parents e42983a1038c
children d9d15ec284ca
files src/util.c
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.c	Sat Feb 04 00:02:41 2006 +0000
+++ b/src/util.c	Sat Feb 04 00:06:34 2006 +0000
@@ -496,7 +496,7 @@
 	 * case, no harm is done here). */
 	if (strftime(buf, sizeof(buf), format, tm) == 0)
 	{
-		buf = '\0';
+		buf[0] = '\0';
 		return buf;
 	}
 
@@ -2477,7 +2477,6 @@
 	GString *cpy;
 	time_t t;
 	struct tm *tme;
-	char tmp[20];
 
 	g_return_val_if_fail(str  != NULL, NULL);
 	g_return_val_if_fail(name != NULL, NULL);
@@ -2501,14 +2500,12 @@
 					break;
 				case 'd':
 					/* append date */
-					strftime(tmp, 20, "%m/%d/%Y", tme);
-					g_string_append(cpy, tmp);
+					g_string_append(cpy, gaim_utf8_strftime("%m/%d/%Y", tme));
 					c++;
 					break;
 				case 't':
 					/* append time */
-					strftime(tmp, 20, "%I:%M:%S %p", tme);
-					g_string_append(cpy, tmp);
+					g_string_append(cpy, gaim_utf8_strftime("%I:%M:%S %p", tme));
 					c++;
 					break;
 				default: