mirror of
https://github.com/fadden/nulib2.git
synced 2025-01-15 23:31:40 +00:00
Corrected off-by-one error in ProDOS day and month conversion.
This commit is contained in:
parent
ab82bd2b4a
commit
575f591f69
@ -303,8 +303,8 @@ BNYConvertDateTime(ushort prodosDate, ushort prodosTime, NuDateTime* pWhen)
|
|||||||
pWhen->second = 0;
|
pWhen->second = 0;
|
||||||
pWhen->minute = prodosTime & 0x3f;
|
pWhen->minute = prodosTime & 0x3f;
|
||||||
pWhen->hour = (prodosTime >> 8) & 0x1f;
|
pWhen->hour = (prodosTime >> 8) & 0x1f;
|
||||||
pWhen->day = prodosDate & 0x1f;
|
pWhen->day = (prodosDate & 0x1f) -1;
|
||||||
pWhen->month = (prodosDate >> 5) & 0x0f;
|
pWhen->month = ((prodosDate >> 5) & 0x0f) -1;
|
||||||
pWhen->year = (prodosDate >> 9) & 0x7f;
|
pWhen->year = (prodosDate >> 9) & 0x7f;
|
||||||
if (pWhen->year < 40)
|
if (pWhen->year < 40)
|
||||||
pWhen->year += 100; /* P8 uses 0-39 for 2000-2039 */
|
pWhen->year += 100; /* P8 uses 0-39 for 2000-2039 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user