Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private void assertCurrentDateAtInstant(TimeZoneKey timeZoneKey, Instant instant

private static long epochDaysInZone(TimeZoneKey timeZoneKey, Instant instant)
{
return LocalDate.from(instant.atZone(ZoneId.of(timeZoneKey.getId()))).toEpochDay();
return LocalDate.from(instant.atZone(timeZoneKey.getZoneId())).toEpochDay();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ public Object[][] sessionZonesDataProvider()
// using two non-JVM zones so that we don't need to worry what Cassandra system zone is
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public Object[][] sessionZonesDataProvider()
// using two non-JVM zones so that we don't need to worry what ClickHouse system zone is
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ public Object[][] sessionZonesDataProvider()
{jvmZone},
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public Object[][] sessionZonesDataProvider()
{ZoneId.of("Europe/Vilnius")},
// minutes offset change since 1970-01-01, no DST
{ZoneId.of("Asia/Kathmandu")},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ public Object[][] sessionZonesDataProvider()
{ZoneId.of("Europe/Vilnius")},
// minutes offset change since 1970-01-01, no DST
{ZoneId.of("Asia/Kathmandu")},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ public Object[][] sessionZonesDataProvider()
// using two non-JVM zones so that we don't need to worry what Oracle system zone is
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public Object[][] sessionZonesDataProvider()
// using two non-JVM zones so that we don't need to worry what Phoenix system zone is
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ public Object[][] sessionZonesDataProvider()
// using two non-JVM zones so that we don't need to worry what Postgres system zone is
{vilnius},
{kathmandu},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ public Object[][] sessionZonesDataProvider()
{ZoneId.of("Europe/Vilnius")},
// minutes offset change since 1970-01-01, no DST
{ZoneId.of("Asia/Kathmandu")},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ public Object[][] sessionZonesDataProvider()
{ZoneId.of("Europe/Vilnius")},
// minutes offset change since 1970-01-01, no DST
{ZoneId.of("Asia/Kathmandu")},
{ZoneId.of(TestingSession.DEFAULT_TIME_ZONE_KEY.getId())},
{TestingSession.DEFAULT_TIME_ZONE_KEY.getZoneId()},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import java.io.Closeable;
import java.net.URI;
import java.time.ZoneId;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
Expand Down Expand Up @@ -157,7 +156,7 @@ private static ClientSession toClientSession(Session session, URI server, Durati
.catalog(session.getCatalog().orElse(null))
.schema(session.getSchema().orElse(null))
.path(session.getPath().toString())
.timeZone(ZoneId.of(session.getTimeZoneKey().getId()))
.timeZone(session.getTimeZoneKey().getZoneId())
.locale(session.getLocale())
.resourceEstimates(resourceEstimates.buildOrThrow())
.properties(properties.buildOrThrow())
Expand Down