toUtcOffset

Converts a string to a UtcOffset.

The string is assumed to be an ISO-8601 UTC offset representation in extended format. For example, Z, +05, or -04:30. The output of UtcOffset.toString can be safely parsed using this method.

fun String.toUtcOffset(): UtcOffset

Converts a string to a UtcOffset using a specific parser.

A set of predefined parsers can be found in DateTimeParsers.

fun String.toUtcOffset(parser: DateTimeParser, settings: DateTimeParserSettings): UtcOffset