Obtains a clock created from specified fixed instant.
package com.logicbig.example.clock;
import java.time.Clock;
import java.time.Instant;
import java.time.ZoneId;
public class FixedExample {
public static void main(String... args) {
Clock c = Clock.fixed(Instant.parse("2017-01-03T10:15:30.00Z"),
ZoneId.of("Asia/Bangkok"));
System.out.println(c);
}
}
Output
FixedClock[2017-01-03T10:15:30Z,Asia/Bangkok]