ZoneOffset query(TemporalQuery<R> query)
queries this offset using the specified query.
query
has the following syntax.
public <R> R query(TemporalQuery<R> query)
The following example shows how to use query
.
import java.time.ZoneOffset; import java.time.chrono.Chronology; import java.time.temporal.TemporalQueries; //from www . ja v a 2s . c o m public class Main { public static void main(String[] args) { ZoneOffset z = ZoneOffset.UTC; Chronology t = z.query(TemporalQueries.chronology()); System.out.println(t); } }
The code above generates the following result.