ptlrs opened a new pull request, #7390: URL: https://github.com/apache/ozone/pull/7390
## What changes were proposed in this pull request? Transition from `Time.now()` to `Instant.now().toEpochMilli()` Please describe your PR in detail: Ozone currently uses Hadoop util's `Time.now()` calls which internally calls `System.currentTimeMillis()` to obtain Unix epoch milliseconds. The `System.currentTimeMillis()` javadoc states: > public static long currentTimeMillis() Returns: the difference, measured in milliseconds, between the **current time** and midnight, January 1, 1970 UTC. The `current time` can be affected by: * Manual changes to the system time. * Automatic adjustments when crossing time zones. * Daylight saving time changes. This can result in time discrepancy in Ozone. The alternative is to use `Instant.now()` which is not affected by changes to system time zones. In this PR: * Transition from `Time.now()` to `Instant.now().toEpochMilli()` * Replace Instant.ofEpochMilli(Time.now()) with `Instant.now()` ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-7911 ## How was this patch tested? CI: https://github.com/ptlrs/ozone/actions/runs/11659263433 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
