java.time.OffsetDateTime.now() 方法示例 java.time.OffsetDateTime.minusYears() 方法示例 java.time.OffsetDateTime.now(Clock clock) java.time.OffsetDateTime.now() 方法示例 package com.codingdict; import java.time.OffsetDateTime; public class OffsetDateTimeDemo { public static void main(String[] args) { OffsetDateTime date = OffsetDateTime.now(); System.out.println(date); } } java.time.OffsetDateTime.minusYears() 方法示例 java.time.OffsetDateTime.now(Clock clock)