Skip to content

Commit a4daadc

Browse files
author
Zhen Li
committed
Fixed failed test due to server time pack method change
The server returns the localTime directly in nano seconds. So no need to convert from UTC.
1 parent 29f6d42 commit a4daadc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

driver/src/main/java/org/neo4j/driver/internal/messaging/PackStreamMessageFormatV2.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ private Value unpackDate() throws IOException
278278

279279
private Value unpackTime() throws IOException
280280
{
281-
long nanoOfDayUtc = unpacker.unpackLong();
281+
long nanoOfDayLocal = unpacker.unpackLong();
282282
int offsetSeconds = Math.toIntExact( unpacker.unpackLong() );
283283

284-
Instant instant = Instant.ofEpochSecond( 0, nanoOfDayUtc );
284+
LocalTime localTime = LocalTime.ofNanoOfDay( nanoOfDayLocal );
285285
ZoneOffset offset = ZoneOffset.ofTotalSeconds( offsetSeconds );
286-
return value( OffsetTime.ofInstant( instant, offset ) );
286+
return value( OffsetTime.of( localTime, offset ) );
287287
}
288288

289289
private Value unpackLocalTime() throws IOException

driver/src/test/java/org/neo4j/driver/v1/util/Neo4jRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class Neo4jRunner
5252
{
5353
private static Neo4jRunner globalInstance;
5454

55-
private static final String DEFAULT_NEOCTRL_ARGS = "-e 3.2.7";
55+
private static final String DEFAULT_NEOCTRL_ARGS = "-e 3.3.4";
5656
public static final String NEOCTRL_ARGS = System.getProperty( "neoctrl.args", DEFAULT_NEOCTRL_ARGS );
5757
public static final URI DEFAULT_URI = URI.create( "bolt://localhost:7687" );
5858
public static final BoltServerAddress DEFAULT_ADDRESS = new BoltServerAddress( DEFAULT_URI );

0 commit comments

Comments
 (0)