@@ -320,11 +320,7 @@ private static void appendQuoted(StringBuilder sb, String str) {
320320 private static final DateTimeFormatter TIMESTAMP_NTZ_FORMATTER = new DateTimeFormatterBuilder ()
321321 .append (DateTimeFormatter .ISO_LOCAL_DATE )
322322 .appendLiteral ('T' )
323- .appendValue (HOUR_OF_DAY , 2 )
324- .appendLiteral (':' )
325- .appendValue (MINUTE_OF_HOUR , 2 )
326- .appendLiteral (':' )
327- .appendValue (SECOND_OF_MINUTE , 2 )
323+ .appendPattern ("HH:mm:ss" )
328324 .appendFraction (MICRO_OF_SECOND , 6 , 6 , true )
329325 .toFormatter (Locale .US );
330326
@@ -339,13 +335,10 @@ private static void appendQuoted(StringBuilder sb, String str) {
339335 new DateTimeFormatterBuilder ()
340336 .append (DateTimeFormatter .ISO_LOCAL_DATE )
341337 .appendLiteral ('T' )
342- .appendValue (HOUR_OF_DAY , 2 )
343- .appendLiteral (':' )
344- .appendValue (MINUTE_OF_HOUR , 2 )
345- .appendLiteral (':' )
346- .appendValue (SECOND_OF_MINUTE , 2 )
338+ .appendPattern ("HH:mm:ss" )
347339 .optionalStart ()
348340 .appendFraction (MICRO_OF_SECOND , 0 , 6 , true )
341+ .optionalEnd ()
349342 .toFormatter (Locale .US );
350343
351344 /** The format for a timestamp with time zone, truncating trailing microsecond zeros. */
@@ -354,8 +347,8 @@ private static void appendQuoted(StringBuilder sb, String str) {
354347 .appendOffset ("+HH:MM" , "+00:00" )
355348 .toFormatter (Locale .US );
356349
357- private static Instant microsToInstant (long timestamp ) {
358- return Instant .EPOCH .plus (timestamp , ChronoUnit .MICROS );
350+ private static Instant microsToInstant (long microsSinceEpoch ) {
351+ return Instant .EPOCH .plus (microsSinceEpoch , ChronoUnit .MICROS );
359352 }
360353
361354 private static void toJsonImpl (byte [] value , byte [] metadata , int pos , StringBuilder sb ,
0 commit comments