public static Long getDateDifferenceInMinutes(Date oldTime) {
    long diff = Math.abs(oldTime.getTime() - new Date().getTime());
    return diff / (60 * 1000) % 60;
  }
Get difference in minutes between old date and now
@param oldTime
@return
ambari-server/src/main/java/org/apache/ambari/server/utils/DateUtils.java