public static void setCalendar(Calendar calendar, int wholeDays,
        int millisecondsInDay, boolean use1904windowing, boolean roundSeconds) {
        int startYear = 1900;
        int dayAdjust = -1; // Excel thinks 2/29/1900 is a valid date, which it isn't
        if (use1904windowing) {
            startYear = 1904;
            dayAdjust = 1; // 1904 date windowing uses 1/2/1904 as the first day
        }
        else if (wholeDays < 61) {
            // Date is prior to 3/1/1900, so adjust because Excel thinks 2/29/1900 exists
            // If Excel date == 2/29/1900, will become 3/1/1900 in Java representation
            dayAdjust = 0;
        }
        calendar.set(startYear, Calendar.JANUARY, wholeDays + dayAdjust, 0, 0, 0);
        calendar.set(Calendar.MILLISECOND, millisecondsInDay);
        if (calendar.get(Calendar.MILLISECOND) == 0) {
            calendar.clear(Calendar.MILLISECOND);
        }
        if (roundSeconds) {
            // This is different from poi where you need to change 500 to 499
            calendar.add(Calendar.MILLISECOND, 499);
            calendar.clear(Calendar.MILLISECOND);
        }
    }
Get EXCEL date as Java Calendar with given time zone.
@param date  The Excel date.
@param use1904windowing  true if date uses 1904 windowing,
 or false if using 1900 date windowing.
@param timeZone The TimeZone to evaluate the date in
@param roundSeconds round to closest second
@return Java representation of the date, or null if date is not a valid Excel date
fastexcel-core/src/main/java/cn/idev/excel/util/DateUtils.java