public static long convertTimeToHybrid(long proleptic) {
    long hybrid = proleptic;
    if (proleptic < SWITCHOVER_MILLIS) {
      String dateStr = PROLEPTIC_TIME_FORMAT.get().format(new Date(proleptic));
      try {
        hybrid = HYBRID_TIME_FORMAT.get().parse(dateStr).getTime();
      } catch (ParseException e) {
        throw new IllegalArgumentException("Can't parse " + dateStr, e);
      }
    }
    return hybrid;
  }
Convert epoch millis from the proleptic Gregorian calendar to the hybrid
Julian/Gregorian.
@param proleptic millis of epoch in the proleptic Gregorian
@return millis of epoch in the hybrid Julian/Gregorian
storage-api/src/java/org/apache/hadoop/hive/common/type/CalendarUtils.java