private long getTimeShiftedStartTime(long startTime) {
    if (startTime < 9999999999l) {
      // Epoch time
      return startTime - (BUFFER_TIME_DIFF_CATCHUP_INTERVAL / 1000);
    } else {
      return startTime - BUFFER_TIME_DIFF_CATCHUP_INTERVAL;
    }
  }
Time shift by a constant taking into account Epoch vs millis
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java