The java.time framework built into Java 8 and later includes the Clock class. This class provides several variations useful for testing our date-time handling code.
Instant.now( Clock.fixed( myInstant , myZoneId ) )
Which Clock instance represents the default used implicitly in java.time calls where we do not specify a Clock?
Instant.now()
I imagine the default is either:
…but the documentation does not say which.
When doing unit-testing, sometimes we need a clock with altered behavior. But when we want to explicitly pass a Clock object that gives default behavior, what do we use?