mhonarc-users

Re: Y2K Problem with MhonArc 2.4.4

2000-01-12 17:22:29
Brian Cameron wrote:

I have included the following string: $MSGLOCALDATE(CUR;%m/%d/%y %H%M)
...
Note that the year value (%y) in the $MSGLOCALDATE is supposed
to be a 2-digit year value.  However, for messages posted in the
year 2000, it is printing out "100", as in the following example:

* NT console 01/11/100 08:38
  John Doe

The explanation is that the year portion of the date, that is returned
from the Perl functions "gmtime" and "localtime", is the current year
minus 1900. I suppose that mhtime.pl has to be modified accordingly, and
that Earl will do something about it in the next version.

In the meantime you can try this:

Exchange the line

  $year = sprintf("%02d", $year);

in the mhtime.pl file (at line 122) for

  $year = sprintf("%02d", (length($year) == 2 ? $year : $year - 100));

/ Gunnar

<Prev in Thread] Current Thread [Next in Thread>