OffsetTime.OfInstant(Instant, ZoneId) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Obtains an instance of OffsetTime from an Instant and zone ID.
[Android.Runtime.Register("ofInstant", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/OffsetTime;", "", ApiSince=26)]
public static Java.Time.OffsetTime? OfInstant(Java.Time.Instant? instant, Java.Time.ZoneId? zone);
[<Android.Runtime.Register("ofInstant", "(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/OffsetTime;", "", ApiSince=26)>]
static member OfInstant : Java.Time.Instant * Java.Time.ZoneId -> Java.Time.OffsetTime
Parameters
- instant
- Instant
the instant to create the time from, not null
- zone
- ZoneId
the time-zone, which may be an offset, not null
Returns
the offset time, not null
- Attributes
Remarks
Obtains an instance of OffsetTime from an Instant and zone ID. This extracts the local time and offset that correspond to the specified instant in the zone. Finding the offset from UTC/Greenwich is simple as there is only one valid offset for each instant. The date component is dropped during the conversion, so the result alone does not identify an instant. The conversion cannot fail because the instant is outside the valid range of dates.
Java reference for java.time.OffsetTime.ofInstant.