public static String convertLongToDate(long timestamp) {
    return convertLongToDate(
        timestamp,
        CommonDescriptor.getInstance().getConfig().getTimestampPrecision(),
        ZoneId.systemDefault());
  }
convert duration string to millisecond, microsecond or nanosecond.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java