ChenSammi commented on code in PR #8681: URL: https://github.com/apache/ozone/pull/8681#discussion_r2194307504
########## hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLCExpiration.java: ########## @@ -57,6 +60,17 @@ public String getDate() { return date; } + public boolean isExpired(long timestamp) { + ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC); + if (zonedDateTime != null) { + return now.isAfter(zonedDateTime); + } else { + ZonedDateTime dateTime = + ZonedDateTime.ofInstant(Instant.ofEpochMilli(timestamp + daysInMilli), ZoneOffset.UTC); + return now.isAfter(dateTime); + } + } Review Comment: System.currentTimeMillis() is UTC time. https://issues.apache.org/jira/browse/HDDS-7911 MR is closed, I guess it's abandoned. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org