X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=9881bbe3aba50daeb1a5c08c18eb50dadc1ec88a;hp=31963474471d71dbd7b3ee2925e50c40272c3d55;hb=5fed0f809d78ea5b4aea7681ad314843e554b090;hpb=f435868132e200bfa71ac155f037cf64bf5414ba diff --git a/sendlib.c b/sendlib.c index 3196347..9881bbe 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1248,17 +1248,13 @@ BODY *mutt_remove_multipart (BODY * b) char *mutt_make_date (char *s, ssize_t len) { - time_t t = time (NULL); - struct tm *l = localtime (&t); - time_t tz = mutt_local_tz (t); + time_t t = time(NULL); + const char *loc; - tz /= 60; - - snprintf (s, len, "Date: %s, %d %s %d %02d:%02d:%02d %+03d%02d\n", - Weekdays[l->tm_wday], l->tm_mday, Months[l->tm_mon], - l->tm_year + 1900, l->tm_hour, l->tm_min, l->tm_sec, - (int) tz / 60, (int) abs (tz) % 60); - return (s); + loc = setlocale(LC_TIME, "C"); + strftime(s, len, "Date: %a, %d %b %Y %T %z\n", localtime(&t)); + setlocale(LC_TIME, loc); + return s; } /* wrapper around mutt_write_address() so we can handle very large