java.time.OffsetDateTime.withDayOfYear() 方法示例 java.time.OffsetDateTime.withDayOfMonth() 方法示例 java.time.OffsetDateTime.withHour() 方法示例 java.time.OffsetDateTime.withDayOfYear() 方法示例 package com.codingdict; import java.time.OffsetDateTime; public class OffsetDateTimeDemo { public static void main(String[] args) { OffsetDateTime date = OffsetDateTime.parse("2017-01-03T10:15:30+01:00"); OffsetDateTime result = date.withDayOfYear(43); System.out.println(result); } } java.time.OffsetDateTime.withDayOfMonth() 方法示例 java.time.OffsetDateTime.withHour() 方法示例