aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-12-03 05:42:57 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-12-03 05:42:57 +0000
commita694f25943adda181db8954e8351d21fe8bec964 (patch)
tree675c46783160c15099320c8eb057a93fd4e15768 /driver.c
parenta3266193deaf5e76210124359e92dc99137162ea (diff)
downloadfetchmail-a694f25943adda181db8954e8351d21fe8bec964.tar.gz
fetchmail-a694f25943adda181db8954e8351d21fe8bec964.tar.bz2
fetchmail-a694f25943adda181db8954e8351d21fe8bec964.zip
Generate RFC822 dates.
svn path=/trunk/; revision=1555
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);
}
}