要将a转换
Instant为a
ZonedDateTime,
ZonedDateTime提供方法
ZonedDateTime.ofInstant(Instant,ZoneId)。所以
因此,假设您要使用
ZonedDateTime默认时区,则您的代码应为
ZonedDateTime d = ZonedDateTime.ofInstant(calculateFromDate.toInstant(), ZoneId.systemDefault());

要将a转换
Instant为a
ZonedDateTime,
ZonedDateTime提供方法
ZonedDateTime.ofInstant(Instant,ZoneId)。所以
因此,假设您要使用
ZonedDateTime默认时区,则您的代码应为
ZonedDateTime d = ZonedDateTime.ofInstant(calculateFromDate.toInstant(), ZoneId.systemDefault());