poliglots opened a new pull request, #12753: URL: https://github.com/apache/maven/pull/12753
Fix issue #12608: MonotonicClock.withZone() was ignoring the zone parameter and returning 'this', violating the java.time.Clock contract. Changes: - Add a 'zone' field to track timezone per instance - Implement withZone() to create a new clock variant with the requested timezone, preserving monotonic timing - Update getZone() to return the instance's actual zone - Throw IllegalArgumentException on null zone (per Clock spec) - Add tests verifying withZone() returns a new instance with correct zone and that monotonic timing is preserved The singleton instance continues to use UTC. Creating timezone variants does not compromise monotonicity since Instant is timezone-agnostic and monotonicity derives from System.nanoTime(). - [x] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0) -- 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]
