mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-27 00:30:10 +00:00
ProDOS month correction (recevied from John B Matthews).
This commit is contained in:
parent
e86ef7130e
commit
9709fe8a03
@ -304,7 +304,7 @@ public class AppleUtil {
|
|||||||
int hm = getWordValue(buffer, offset+2);
|
int hm = getWordValue(buffer, offset+2);
|
||||||
|
|
||||||
int day = ymd & 0x001f; // bits 0-4
|
int day = ymd & 0x001f; // bits 0-4
|
||||||
int month = (ymd & 0x01e0) >> 5; // bits 5-8
|
int month = ((ymd & 0x01e0) >> 5) - 1; // bits 5-8
|
||||||
int year = (ymd & 0xfe00) >> 9; // bits 9-15
|
int year = (ymd & 0xfe00) >> 9; // bits 9-15
|
||||||
int minute = hm & 0x003f; // bits 0-5
|
int minute = hm & 0x003f; // bits 0-5
|
||||||
int hour = (hm & 0x1f00) >> 8; // bits 8-12
|
int hour = (hm & 0x1f00) >> 8; // bits 8-12
|
||||||
@ -329,7 +329,7 @@ public class AppleUtil {
|
|||||||
GregorianCalendar gc = new GregorianCalendar();
|
GregorianCalendar gc = new GregorianCalendar();
|
||||||
gc.setTime(date);
|
gc.setTime(date);
|
||||||
day = gc.get(GregorianCalendar.DAY_OF_MONTH);
|
day = gc.get(GregorianCalendar.DAY_OF_MONTH);
|
||||||
month = gc.get(GregorianCalendar.MONTH);
|
month = gc.get(GregorianCalendar.MONTH) + 1;
|
||||||
year = gc.get(GregorianCalendar.YEAR);
|
year = gc.get(GregorianCalendar.YEAR);
|
||||||
minute = gc.get(GregorianCalendar.MINUTE);
|
minute = gc.get(GregorianCalendar.MINUTE);
|
||||||
hour = gc.get(GregorianCalendar.HOUR_OF_DAY);
|
hour = gc.get(GregorianCalendar.HOUR_OF_DAY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user