private static NanoTime writeHive4(String str, String sourceZone, boolean legacyConversion) {
    Timestamp newTs = PrimitiveObjectInspectorUtils.getTimestampFromString(str);
    return NanoTimeUtils.getNanoTime(newTs, ZoneId.of(sourceZone), legacyConversion);
  }
Converts the specified nano time to a java.sql.Timestamp using Hive2 legacy code.
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/serde/TestParquetTimestampsHive2Compatibility.java