Skip to content

Commit

Permalink
Fix for ResultSetRegressionTest.testBug94457() sporadic failures.
Browse files Browse the repository at this point in the history
Change-Id: Ie012d3fac59432503ac44b97758e579686e22503
  • Loading branch information
fjssilva committed May 11, 2022
1 parent 82d524c commit 8fe1660
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import java.sql.Timestamp;
import java.sql.Types;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
Expand Down Expand Up @@ -7639,8 +7640,8 @@ public void testBug94457() throws Exception {
System.out.println("getObject(ts, OffsetDateTime.class) : " + odt2 + " (" + odt2.toEpochSecond() + ")");
System.out.println("getObject(odt, OffsetDateTime.class) : " + odt3 + " (" + odt3.toEpochSecond() + ")");

int localOffset = TimeZone.getDefault().getRawOffset() / 1000;
int serverOffset = serverTz.getRawOffset() / 1000;
int localOffset = ZoneId.of(TimeZone.getDefault().getID()).getRules().getOffset(Instant.now()).getTotalSeconds();
int serverOffset = ZoneId.of(serverTz.getID()).getRules().getOffset(Instant.now()).getTotalSeconds();

int expOffset = 6 * 60 * 60;

Expand Down

0 comments on commit 8fe1660

Please sign in to comment.