libpurple/util.c

changeset 41250
e82d07ed6862
parent 41249
b147a2ac58f0
child 41373
03b5e6d53fa1
--- a/libpurple/util.c	Thu Jan 13 23:47:42 2022 -0600
+++ b/libpurple/util.c	Fri Jan 14 00:11:38 2022 -0600
@@ -48,16 +48,13 @@
 /**************************************************************************
  * Date/Time Functions
  **************************************************************************/
-
 const char *
-purple_utf8_strftime(const char *format, const struct tm *tm)
+purple_date_format_full(const struct tm *tm)
 {
 	static char buf[128];
 	GDateTime *dt;
 	char *utf8;
 
-	g_return_val_if_fail(format != NULL, NULL);
-
 	if (tm == NULL)
 	{
 		dt = g_date_time_new_now_local();
@@ -67,12 +64,12 @@
 				tm->tm_min, tm->tm_sec);
 	}
 
-	utf8 = g_date_time_format(dt, format);
+	utf8 = g_date_time_format(dt, "%c");
 	g_date_time_unref(dt);
 
 	if (utf8 == NULL) {
 		purple_debug_error("util",
-				"purple_utf8_strftime(): Formatting failed\n");
+				"purple_date_format_full(): Formatting failed\n");
 		return "";
 	}
 
@@ -81,12 +78,6 @@
 	return buf;
 }
 
-const char *
-purple_date_format_full(const struct tm *tm)
-{
-	return purple_utf8_strftime("%c", tm);
-}
-
 /**************************************************************************
  * Path/Filename Functions
  **************************************************************************/

mercurial