diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-12-03 05:42:57 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-12-03 05:42:57 +0000 |
commit | a694f25943adda181db8954e8351d21fe8bec964 (patch) | |
tree | 675c46783160c15099320c8eb057a93fd4e15768 /driver.c | |
parent | a3266193deaf5e76210124359e92dc99137162ea (diff) | |
download | fetchmail-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.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); } } |