[pgjdbc/pgjdbc] c02aa7: feat: use direct wire format -> LocalDate conversi...

Поиск
Список
Период
Сортировка
Искать

[pgjdbc/pgjdbc] c02aa7: feat: use direct wire format -> LocalDate conversi...

От:
Uwe Schindler <noreply@github.com>
Дата:
  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: c02aa7725a3c5c71314e0e8c441a72fc97ff83a0
      https://github.com/pgjdbc/pgjdbc/commit/c02aa7725a3c5c71314e0e8c441a72fc97ff83a0
  Author: Uwe Schindler 
  Date:   2022-03-03 (Thu, 03 Mar 2022)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc42/GetObject310Test.java

  Log Message:
  -----------
  feat: use direct wire format -> LocalDate conversion without resorting to java.util.Date, java.util.Calendar, and default timezones

Both text and binary formats for date and timestamp contain all the information
that is needed to instantialte LocalDate. There's no need to roundtrip with Date and timezones.

Converting database results into LocalDate directly reduces the number of moving parts and it makes
the code easier to follow.

fixes #2221




FAQ