aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index 7e5824ce..7607004b 100644
--- a/driver.c
+++ b/driver.c
@@ -1214,7 +1214,16 @@ int num; /* index of message */
buf[1] = '\0';
time(&now);
+#ifdef STRFTIME
+ /* conform to RFC822 */
+ strftime(buf, sizeof(buf), "%a, %d b %Y %H:%M:%S %Z\n", localtime(&now));
+#else
+ /*
+ * This is really just a fallback, as the date format ctime(3)
+ * emits is not RFC822 conformant.
+ */
strcat(buf, ctime(&now));
+#endif /* STRFTIME */
n = stuffline(ctl, buf);
}
}