推荐使用 LocalDate:代表本地日期(年,月,日,星期) LocalTime:代表本地时间(时,分,秒,纳秒) LocalDateTime:代表本地日期,时间(年,月,星期,时,分,秒,纳秒) 它们获取对象的方案: