OffsetDateTime.ToZonedDateTime 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将此日期时间转换为 ZonedDateTime,并使用偏移量作为区域 ID。
[Android.Runtime.Register("toZonedDateTime", "()Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public Java.Time.ZonedDateTime? ToZonedDateTime();
[<Android.Runtime.Register("toZonedDateTime", "()Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
member this.ToZonedDateTime : unit -> Java.Time.ZonedDateTime
返回
表示同一本地日期时间和偏移量的分区日期时间,而不是 null
- 属性
注解
将此日期时间转换为 ZonedDateTime,并使用偏移量作为区域 ID。 这将使用偏移量作为区域 ID 创建最简单的 ZonedDateTime。 若要控制使用的时区,请参阅 atZoneSameInstant(ZoneId)和 atZoneSimilarLocal(ZoneId)。
Java参考java.time.OffsetDateTime.toZonedDateTime。