public static long getTimePartitionId(long time) {
    time -= timePartitionOrigin;
    return time > 0 || time % timePartitionInterval == 0
        ? time / timePartitionInterval
        : time / timePartitionInterval - 1;
  }
Time range for dividing database, the time unit is the same with IoTDB's TimestampPrecision
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/TimePartitionUtils.java