Skip to content

Commit

Permalink
fixed the comparison again
Browse files Browse the repository at this point in the history
  • Loading branch information
davecramer committed Feb 23, 2024
1 parent cc881af commit a698519
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,10 @@ public OffsetTime toOffsetTimeBin(byte[] bytes) throws PSQLException {
}
// Not sure how to do this. There is no 24:00:00 in java, the largest time is 23:59:59.999999999-18:00
for ( int i = 0; i < 8; i++ ) {
if (bytes[i] == MAX_OFFSET[i] && i == 7) {
return OffsetTime.MAX;
}
else {
if (bytes[i] != MAX_OFFSET[i]) {
break;
} else if (i == 7) {
return OffsetTime.MAX;
}
}

Expand Down

0 comments on commit a698519

Please sign in to comment.