private static void computeExpiredDatePtn(long ttl) {
    // Use UTC date to ensure reader date is same on all timezones.
    LocalDate expiredDate
            = LocalDateTime.ofEpochSecond((clock.getTime() - ttl) / 1000, 0, ZoneOffset.UTC).toLocalDate();
    expiredDatePtn = "date=" + DateTimeFormatter.ISO_LOCAL_DATE.format(expiredDate);
  }
Compute the expired date partition, using the underlying clock in UTC time.
metastore/src/java/org/apache/hadoop/hive/metastore/HiveProtoEventsCleanerTask.java