2 ms·
This is not pedantry. It has real-world consequences. Based on the misleading text in the documentation, the folks writing the Postgres JDBC driver made a decis
by stickfigure 2y ago
This is not pedantry. It has real-world consequences. Based on the misleading text in the documentation, the folks writing the Postgres JDBC driver made a decision to map TIMESTAMPTZ to OffsetDateTime instead of Instant. Which caused some annoying bugs in my 1.5M line codebase that processes financial transactions. Which is why I'm a bit pissed about all this.
If you walk into a javascript job interview and answer "UTC" to the question "In what timezone is Date.now()?", you would get laughed at. I don't understand why Postgres people get a pass.
If it's an instant, treat it as an instant. And it is an instant.
- NoInkling 2y agohttps://jdbc.postgresql.org/documentation/query/#using-java-8-date-and-time-classes https://jdbc.postgresql.org/documentation/query/#using-java-... > note that all OffsetDateTime instances will have be in UTC (have offset 0) Is this not effectively an Instant? Are you saying that the instant it represents can be straight up wrong? Or are you saying that because it uses OffsetDateTime, issues are being caused based on people assuming that it represents an input offset (when in reality any such information was lost at input time)? Also that page implies that they did it that way to align with the JDBC spec, rather than your assertions about misleading documentation.