public static LocalDateTime now (Clock clock)

Obtains the current date-time from the specified clock.

This will query the specified clock to obtain the current date-time. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using dependency injection.

Parameters:
clock    the clock to use, not null

Returns:  the current date-time, not null