Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

Parse

static func Parse(value: string) -> Result<TimeOffset, DateTimeParseError>

Declaring type: TimeOffset
Module: System.Time
Assembly: System.Runtime.dll
Source file: TimeOffset.rvn

Parses Z or signed HH:mm[:ss], within the existing inclusive ±18-hour range.

Parameters

Name Type Description
value String Complete ASCII text without whitespace, fractional seconds or named zones.

Return value

Result<TimeOffset, DateTimeParseError>

The offset, or InvalidFormat for unsupported syntax or OutOfRange for invalid fields.

Remarks

Negative zero denotes zero, not an unknown offset. Offset precision is whole seconds.