java.time.Instant.with(TemporalField field, long newValue) java.time.Instant.with() 方法示例 java.time.LocalDate.adjustInto() 方法示例 java.time.Instant.with(TemporalField field, long newValue) package com.codingdict; import java.time.Instant; import java.time.temporal.ChronoField; public class InstantDemo { public static void main(String[] args) { Instant instant = Instant.parse("2017-12-03T10:15:30.00Z"); System.out.println(instant.with(ChronoField.NANO_OF_SECOND, 20)); } } java.time.Instant.with() 方法示例 java.time.LocalDate.adjustInto() 方法示例