This commit is contained in:
Denis Molony 2023-02-15 20:30:34 +10:00
parent e2abdcabc9
commit 4e48437adc
1 changed files with 3 additions and 2 deletions

View File

@ -519,12 +519,13 @@ public final class Utility
{ {
int[] val = new int[6]; int[] val = new int[6];
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
val[i] = Integer.parseInt (String.format ("%02X", buffer[ptr + i] & 0xFF)); // val[i] = Integer.parseInt (String.format ("%02X", buffer[ptr + i] & 0xFF));
val[i] = buffer[ptr + i] & 0xFF;
LocalDateTime date = LocalDateTime.of (val[3] + 2000, val[5], val[4], val[2], val[1], val[0]); LocalDateTime date = LocalDateTime.of (val[3] + 2000, val[5], val[4], val[2], val[1], val[0]);
return date; return date;
} }
catch (DateTimeException | NumberFormatException e) catch (DateTimeException e)
{ {
return null; return null;
} }