New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in TimestampUtils #789

Closed
mihhail-lapushkin opened this Issue Mar 24, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@mihhail-lapushkin

mihhail-lapushkin commented Mar 24, 2017

  public LocalDateTime toLocalDateTimeBin(TimeZone tz, byte[] bytes) throws PSQLException {

    ParsedBinaryTimestamp parsedTimestamp = this.toParsedTimestampBin(tz, bytes, true);
    if (parsedTimestamp.infinity == Infinity.POSITIVE) {
      return LocalDateTime.MAX;
    } else if (parsedTimestamp.infinity == Infinity.NEGATIVE) {
      return LocalDateTime.MAX;
    }

    return LocalDateTime.ofEpochSecond(parsedTimestamp.millis / 1000L, parsedTimestamp.nanos, ZoneOffset.UTC);
  }

Should be:

    } else if (parsedTimestamp.infinity == Infinity.NEGATIVE) {
      return LocalDateTime.MIN;
    }
@davecramer

This comment has been minimized.

Member

davecramer commented Mar 24, 2017

Thanks!

davecramer added a commit to davecramer/pgjdbc that referenced this issue Mar 24, 2017

fix typo in TimestampUtils pgjdbc#789
add tests for it for jdbc42
add binary mode tests for infinity tests for timestamps

vlsi added a commit to vlsi/pgjdbc that referenced this issue Apr 16, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes pgjdbc#789

vlsi added a commit to vlsi/pgjdbc that referenced this issue Apr 16, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes pgjdbc#789

vlsi added a commit to vlsi/pgjdbc that referenced this issue Apr 16, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes pgjdbc#789

vlsi added a commit to vlsi/pgjdbc that referenced this issue Apr 17, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes pgjdbc#789

@vlsi vlsi closed this in #814 Apr 17, 2017

vlsi added a commit that referenced this issue Apr 17, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes #789

davecramer added a commit to davecramer/pgjdbc that referenced this issue Sep 19, 2017

fix: infinity handling for java.time types
Date/Timestamp infinity get converted to LocalDate.MIN/MAX and friends.

fixes pgjdbc#789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment