public static long getEpochMillisecond(Timestamp timestamp) {
        return timestamp.toLocalDateTime().toEpochSecond(ZoneOffset.UTC) * 1000 + timestamp.getNanos() / 1000_1000L;
    }
The number of days from year zero to year 1970.
There are five 400 year cycles from year zero to 2000.
There are 7 leap years from 1970 to 2000.
indexr-common/src/main/java/io/indexr/util/DateTimeUtil.java