Corrected off-by-one error in ProDOS day and month conversion.

This commit is contained in:
Andy McFadden 2003-03-10 02:40:44 +00:00
parent ab82bd2b4a
commit 575f591f69
1 changed files with 2 additions and 2 deletions

View File

@ -303,8 +303,8 @@ BNYConvertDateTime(ushort prodosDate, ushort prodosTime, NuDateTime* pWhen)
pWhen->second = 0;
pWhen->minute = prodosTime & 0x3f;
pWhen->hour = (prodosTime >> 8) & 0x1f;
pWhen->day = prodosDate & 0x1f;
pWhen->month = (prodosDate >> 5) & 0x0f;
pWhen->day = (prodosDate & 0x1f) -1;
pWhen->month = ((prodosDate >> 5) & 0x0f) -1;
pWhen->year = (prodosDate >> 9) & 0x7f;
if (pWhen->year < 40)
pWhen->year += 100; /* P8 uses 0-39 for 2000-2039 */