Hi, all.  I haven't actually tested it, but upon perusing the code for
mytimegm(), it seems it won't treat the year 2000 correctly as a leap
year.

The LEAP_YEAR() macro is currently:

  #define LEAP_YEAR(y) (((y)%4 == 0) && ((y)%100 != 0 || (y)%400 == 0))

This would work fine if it were given the full 4 digit year, but
it's given tm_year format years, i.e. year-1900.  So, in the year
2000, the tm_year will be 100, for which the macro would return 0.

It seems to me the LEAP_YEAR() macro should be:

  #define LEAP_YEAR(y) ((((y+1900))%4 == 0) && (((y+1900))%100 != 0 || ((y+1900))%400 
== 0))

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to