X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fgenstamp.c;h=e8d5dd86bc3f3b4c4c3a64168e4bc00add8b8d9b;hb=HEAD;hp=b3e910baeed71cef8582e07518684c21f344d8e6;hpb=d3861822d4a742cf184d812d5c6fffdf2f8b035a;p=citadel.git diff --git a/citadel/genstamp.c b/citadel/genstamp.c deleted file mode 100644 index b3e910bae..000000000 --- a/citadel/genstamp.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Function to generate RFC822-compliant textual time/date stamp - * - * $Id$ - * - */ - -#include -#include -#include -#include -#include -#include "genstamp.h" - - -static char *months[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" -}; - -static char *weekdays[] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" -}; - - -/* - * Supplied with a unix timestamp, generate an RFC822-compliant textual - * time and date stamp. - */ -void generate_rfc822_datestamp(char *buf, time_t xtime) { - struct tm *t; - - t = localtime(&xtime); - - sprintf(buf, "%s, %02d %s %04d %02d:%02d:%02d %s", - weekdays[t->tm_wday], - t->tm_mday, - months[t->tm_mon], - t->tm_year + 1900, - t->tm_hour, - t->tm_min, - t->tm_sec, - tzname[0] - ); -} -