Flight SQL JDBC: Fix timezone/timestamp handling
- Linguagem predominante
- Java
- Estrelas
- 94
- Forks
- 152
- Merge médio
- 3d 16h
- PRs com merge (30d)
- 11
Descrição
### Describe the enhancement requested
I believe the JDBC driver is handling timezones/timestamps/java.sql.Timestamp entirely incorrectly.
- Timestamps are round-tripped through LocalDateTime always. I believe this is wrong for timestamps with timezones: we should not round trip through a wall clock time since the same wall clock time may correspond to multiple different instants (during a DST transition)
- From experimenting with the PostgreSQL JDBC driver, it appears that when requesting a java.sql.Timestamp, the expected behavior is:
- Naive timestamp: return a Timestamp that appears to have the right wall clock time in the given Calendar, or the system time zone if no calendar is supplied. (In other words, use Timestamp as a janky LocalDateTime.)
- Zoned timestamp: return a Timestamp whose value is the timestamp in UTC. (In other words, use Timestamp as an Instant.)
It appears our driver does not do this properly.
Guia de contribuição
Direção de pesquisa
Comece rastreando como o Flight SQL JDBC driver lida com java.sql.Timestamp, LocalDateTime, fusos horários e Calendar, comparando o comportamento com as expectativas do PostgreSQL JDBC descritas na issue. Considera-se concluído quando timestamps ingênuos preservam o valor de horário de parede solicitado e timestamps com fuso preservam o instante UTC, incluindo o comportamento durante transições de DST.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- java
- Domínio
- databases
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100