poliglots commented on code in PR #12753:
URL: https://github.com/apache/maven/pull/12753#discussion_r3802047268


##########
api/maven-api-core/src/main/java/org/apache/maven/api/MonotonicClock.java:
##########
@@ -146,27 +148,50 @@ public Duration elapsedTime() {
     }
 
     /**
-     * Returns the zone ID of this clock, which is always UTC.
+     * Returns the zone ID of this clock.
+     * <p>
+     * The singleton instance always returns UTC. Clock instances created
+     * via {@link #withZone(ZoneId)} return their configured timezone.
      *
-     * @return the UTC zone ID
+     * @return the zone ID
      */
     @Override
     public ZoneId getZone() {
-        return ZoneOffset.UTC;
+        return zone;
     }
 
     /**
-     * Returns this clock since timezone adjustments are not supported.
+     * Returns a copy of this clock with the specified timezone.
      * <p>
-     * This implementation maintains UTC time to ensure monotonic behavior.
-     * The provided zone parameter is ignored.
+     * Since {@link Instant} instances are timezone-agnostic and the monotonic
+     * property derives from {@link System#nanoTime()}, the returned clock
+     * maintains identical monotonic timing but reports the requested timezone.
      *
-     * @param zone the target timezone (ignored)
-     * @return this clock instance
+     * @param zone the target timezone, or {@code null} to use UTC
+     * @return a new clock with the specified timezone
+     * @throws IllegalArgumentException if zone is {@code null}

Review Comment:
   Fixed review findings in the commit 
[41cc260](https://github.com/apache/maven/pull/12753/commits/41cc260375e71812aaaebc504963420decd20b37)



-- 
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]

Reply via email to