Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: date rounding errors for dates before 1970
millis % ONEDAY should be reworked to floorMod(millis, ONEDAY) Regular division "rounds" towards zero, however that is not what we want for dates Division "towards zero" results to adding a day for dates with "negative" long values. So we should use floorDiv/floorMod to get date/time components see #1499
- Loading branch information
Showing with 112 additions and 339 deletions.
- +7 −11 pgjdbc/src/main/java/org/postgresql/jdbc/TimestampUtils.java
- +69 −323 pgjdbc/src/test/java/org/postgresql/test/jdbc2/TimestampTest.java
- +3 −0 pgjdbc/src/test/java/org/postgresql/test/jdbc2/TimezoneTest.java
- +3 −0 pgjdbc/src/test/java/org/postgresql/test/jdbc42/GetObject310Test.java
- +30 −5 pgjdbc/src/test/java/org/postgresql/test/jdbc42/SetObject310Test.java
There are no files selected for viewing
Oops, something went wrong.