to Offset Time
Returns the combined time and UTC offset.
Converts a string to an OffsetTime.
The string is assumed to be an ISO-8601 time with the UTC offset in extended format. For example, 02:30+01:00 or 14:40:23Z. The output of OffsetTime.toString can be safely parsed using this method.
Throws
if parsing fails
if the parsed time or offset is invalid
fun String.toOffsetTime(parser: DateTimeParser, settings: DateTimeParserSettings = DateTimeParserSettings.DEFAULT): OffsetTime
Content copied to clipboard
Converts a string to an OffsetTime using a specific parser.
A set of predefined parsers can be found in DateTimeParsers.
Any custom parser must be capable of supplying the fields necessary to resolve both a Time and UtcOffset.
Throws
if parsing fails
if the parsed time or offset is invalid