Вот что я использовал:
static const char *DAY_NAMES[] =
{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
static const char *MONTH_NAMES[] =
{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
char *Rfc1123_DateTimeNow()
{
const int RFC1123_TIME_LEN = 29;
time_t t;
struct tm tm;
char * buf = malloc(RFC1123_TIME_LEN+1);
time(&t);
gmtime_s(&tm, &t);
strftime(buf, RFC1123_TIME_LEN+1, "---, %d --- %Y %H:%M:%S GMT", &tm);
memcpy(buf, DAY_NAMES[tm.tm_wday], 3);
memcpy(buf+8, MONTH_NAMES[tm.tm_mon], 3);
return buf;
}