- StrEscAppend(Target, NULL, asctime(localtime(&now)), 0, 0);
+#ifdef HAVE_SOLARIS_LOCALTIME_R
+ asctime_r(localtime(&now), buf, sizeof(buf));
+#else
+ asctime_r(localtime(&now), buf);
+#endif
+ bufused = strlen(buf);
+ if ((bufused > 0) && (buf[bufused - 1] == '\n')) {
+ buf[bufused - 1] = '\0';
+ bufused --;
+ }
+ StrEscAppend(Target, NULL, buf, 0, 0);