public static int timestampMillisToDate(long ts) {
    int days = (int) (ts / MILLIS_PER_DAY);
    if (days < 0) {
      days = days - 1;
    }
    return days;
  }
Get date from a timestamp.

@param ts the timestamp in milliseconds.
@return the date in days.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/util/DateTimeUtils.java