ZonedDateTime.OfStrict(LocalDateTime, ZoneOffset, 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 ZonedDateTime strictly validating the combination of local date-time, offset and zone ID.
[Android.Runtime.Register("ofStrict", "(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)]
public static Java.Time.ZonedDateTime? OfStrict(Java.Time.LocalDateTime? localDateTime, Java.Time.ZoneOffset? offset, Java.Time.ZoneId? zone);
[<Android.Runtime.Register("ofStrict", "(Ljava/time/LocalDateTime;Ljava/time/ZoneOffset;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;", "", ApiSince=26)>]
static member OfStrict : Java.Time.LocalDateTime * Java.Time.ZoneOffset * Java.Time.ZoneId -> Java.Time.ZonedDateTime
Parameters
- localDateTime
- LocalDateTime
the local date-time, not null
- offset
- ZoneOffset
the zone offset, not null
- zone
- ZoneId
the time-zone, not null
Returns
the zoned date-time, not null
- Attributes
Remarks
Obtains an instance of ZonedDateTime strictly validating the combination of local date-time, offset and zone ID. This creates a zoned date-time ensuring that the offset is valid for the local date-time according to the rules of the specified zone. If the offset is invalid, an exception is thrown.
Java reference for java.time.ZonedDateTime.ofStrict.