Skip to content

Commit

Permalink
loop for checking for 24:00:00 was wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
davecramer committed Feb 23, 2024
1 parent 3242e16 commit cc881af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,14 @@ public OffsetTime toOffsetTimeBin(byte[] bytes) throws PSQLException {
if (bytes == null) {
return null;
}
// 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;
}

Check failure on line 548 in pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java

View workflow job for this annotation

GitHub Actions / Code style

[Task :postgresql:checkstyleMain] [RightCurly] '}' at column 7 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).

Check failure on line 548 in pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java

View workflow job for this annotation

GitHub Actions / Code style

[Task :postgresql:checkstyleMain] [RightCurly] '}' at column 7 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).

Check failure on line 548 in pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java

View workflow job for this annotation

GitHub Actions / ubuntu, 17 seed build cache

[Task :postgresql:checkstyleMain] [RightCurly] '}' at column 7 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally).
else {
break;
}
}

final ParsedTimestamp ts = parseBackendTimestamp(bytes);
Expand Down

0 comments on commit cc881af

Please sign in to comment.