On Wed, Apr 21, 1999 at 16:22:23 +0200, [EMAIL PROTECTED] wrote:
> Hi there,
> 
> is it possible to add anything to the date header?
> 
> It now reads:
> Date: Wed, 21 Apr 1999 10:36:03 +0200
> 
> and I'd like it to read something like:
> Date: Wed, 21 Apr 1999 (2752 ad U.c.) 10:36:03 +0200
>                        ^^^^^^^^^^^^^^
> perhaps in a way it calculates current year + 753 (that possibly belongs
> to the date_format string, but where is it located?

It can't be done without changing the source. But fortunately
that's rather easy to do in this case.

Edit sendlib.c and find the function "mutt_make_date" around line
1146 and replace it with this code:

char *mutt_make_date (char *s, size_t len)
{
  time_t t = time (NULL);
  struct tm *l = localtime (&t);
  time_t tz = mutt_local_tz (t);

  tz /= 60;

  snprintf (s, len,
            "Date: %s, %d %s %d (%d ad U.c.) %02d:%02d:%02d %+03d%02d\n",
            Weekdays[l->tm_wday], l->tm_mday, Months[l->tm_mon],
            l->tm_year + 1900, l->tm_year + 1900 + 753,
            l->tm_hour, l->tm_min, l->tm_sec,
            tz / 60, abs (tz) % 60);
  return (s);
}

I don't make a patch because it would conflict with the bugfix
patch posted by TLR a few days ago to fix the Date:-header if the
local timezone isn't a whole number of hours. The fix is included
in the above code.

BTW what happened 2752 years ago?

-- 
Byrial

Reply via email to