java.time.LocalTime.truncatedTo() 方法示例 java.time.LocalTime.withSecond() 方法示例 java.time.LocalTime.until() 方法示例 java.time.LocalTime.truncatedTo() 方法示例 package com.codingdict; import java.time.LocalTime; import java.time.temporal.ChronoUnit; public class LocalTimeDemo { public static void main(String[] args) { LocalTime date = LocalTime.now(); System.out.println(date.truncatedTo(ChronoUnit.HOURS)); } } java.time.LocalTime.withSecond() 方法示例 java.time.LocalTime.until() 方法示例