Re: Y2K Problem with MhonArc 2.4.4

2000-01-13 22:47:20
On January 12, 2000 at 23:55, Gunnar Hjalmarsson wrote:

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

Exchange the line

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

in the file (at line 122) for

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

Probably quicker to just subtract 100 from $year if $year > 100
after $yearfull has been set:

    $year -= 100  if $year > 100;

Note, if you have for your system, you can set the
POSIXSTRFTIME resource to true.  MHonArc will then use
POSIX::strftime() instead of its own version.  If POSIXSTRFTIME
is set to true, but POSIX::strftime() is not defined, MHonArc
will fallback to its own implementation.

Side note: It appears that the $MMDDYY$, and similiar 2 digit year
resource variables, still behave properly.


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