Index: functions.c
===================================================================
--- functions.c	(revision 99ac28af43791c8978442bd757de068df2e1b5ff)
+++ functions.c	(revision 287c6348d5150301d79b7302c118f46c0bf72182)
@@ -1223,4 +1223,5 @@
 void G_GNUC_PRINTF(1, 2) owl_function_debugmsg(const char *fmt, ...)
 {
+  char *tmpbuff;
   FILE *file;
   time_t now;
@@ -1237,6 +1238,8 @@
   now = time(NULL);
 
-  fprintf(file, "[%d -  %.24s - %lds]: ",
-	  (int) getpid(), ctime(&now), now - owl_global_get_starttime(&g));
+  tmpbuff = owl_util_time_to_timestr(localtime(&now));
+  fprintf(file, "[%d -  %s - %lds]: ",
+          (int) getpid(), tmpbuff, now - owl_global_get_starttime(&g));
+  g_free(tmpbuff);
   vfprintf(file, fmt, ap);
   putc('\n', file);
@@ -1430,5 +1433,5 @@
 #ifdef HAVE_LIBZEPHYR
     if (owl_message_is_direction_in(m)) {
-      char *tmpbuff;
+      char *tmpbuff, *tmpbuff2;
       int i, fields;
 
@@ -1476,13 +1479,13 @@
 
 	for (i = 0; i < fields; i++) {
-	  tmpbuff = owl_zephyr_get_field_as_utf8(n, i + 1);
-
-	  g_strdelimit(tmpbuff, "\n", '~');
-	  g_strdelimit(tmpbuff, "\r", '!');
-
-	  owl_fmtext_appendf_normal(&fm, "  Field %i   : %s\n", i + 1, tmpbuff);
-	  g_free(tmpbuff);
+          tmpbuff = owl_zephyr_get_field_as_utf8(n, i + 1);
+          tmpbuff2 = owl_text_indent(tmpbuff, 14, false);
+          owl_fmtext_appendf_normal(&fm, "  Field %i   : %s\n", i + 1, tmpbuff2);
+          g_free(tmpbuff2);
+          g_free(tmpbuff);
 	}
-	owl_fmtext_appendf_normal(&fm, "  Default Fm: %s\n", n->z_default_format);
+        tmpbuff = owl_text_indent(n->z_default_format, 14, false);
+        owl_fmtext_appendf_normal(&fm, "  Default Fm: %s\n", tmpbuff);
+        g_free(tmpbuff);
       }
 
@@ -1761,4 +1764,5 @@
 void owl_function_status(void)
 {
+  char *tmpbuff;
   char buff[MAXPATHLEN+1];
   time_t start;
@@ -1788,5 +1792,7 @@
   owl_fmtext_append_normal(&fm, "\n");
 
-  owl_fmtext_appendf_normal(&fm, "  Startup Time: %s", ctime(&start));
+  tmpbuff = owl_util_time_to_timestr(localtime(&start));
+  owl_fmtext_appendf_normal(&fm, "  Startup Time: %s\n", tmpbuff);
+  g_free(tmpbuff);
 
   up=owl_global_get_runtime(&g);
@@ -2126,7 +2132,7 @@
 
 /* Create a new filter, or replace an existing one
- * with a new definition.
+ * with a new definition. Returns true on success.
  */
-void owl_function_create_filter(int argc, const char *const *argv)
+bool owl_function_create_filter(int argc, const char *const *argv)
 {
   owl_filter *f;
@@ -2136,5 +2142,5 @@
   if (argc < 2) {
     owl_function_error("Wrong number of arguments to filter command");
-    return;
+    return false;
   }
 
@@ -2146,5 +2152,5 @@
   if (!strcmp(argv[1], "all")) {
     owl_function_error("You may not change the 'all' filter.");
-    return;
+    return false;
   }
 
@@ -2154,13 +2160,13 @@
     if (!f) {
       owl_function_error("The filter '%s' does not exist.", argv[1]);
-      return;
+      return false;
     }
     if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) {
       owl_function_error("The color '%s' is not available.", argv[3]);
-      return;
+      return false;
     }
     owl_filter_set_fgcolor(f, owl_util_string_to_color(argv[3]));
     owl_mainwin_redisplay(owl_global_get_mainwin(&g));
-    return;
+    return false;
   }
   if (argc==4 && !strcmp(argv[2], "-b")) {
@@ -2168,13 +2174,13 @@
     if (!f) {
       owl_function_error("The filter '%s' does not exist.", argv[1]);
-      return;
+      return false;
     }
     if (owl_util_string_to_color(argv[3])==OWL_COLOR_INVALID) {
       owl_function_error("The color '%s' is not available.", argv[3]);
-      return;
+      return false;
     }
     owl_filter_set_bgcolor(f, owl_util_string_to_color(argv[3]));
     owl_mainwin_redisplay(owl_global_get_mainwin(&g));
-    return;
+    return true;
   }
 
@@ -2183,5 +2189,5 @@
   if (f == NULL) {
     owl_function_error("Invalid filter");
-    return;
+    return false;
   }
 
@@ -2204,4 +2210,5 @@
   }
   owl_mainwin_redisplay(owl_global_get_mainwin(&g));
+  return true;
 }
 
@@ -2455,5 +2462,5 @@
   /* if it already exists then go with it.  This lets users override */
   if (owl_global_get_filter(&g, filtname)) {
-    return(g_strdup(filtname));
+    return filtname;
   }
 
@@ -3409,7 +3416,6 @@
   char *buff;
 
-  now=time(NULL);
-  date=g_strdup(ctime(&now));
-  date[strlen(date)-1]='\0';
+  now = time(NULL);
+  date = owl_util_time_to_timestr(localtime(&now));
 
   buff = g_strdup_printf("%s %s", date, string);
