Date UtilsFrom ISO 8601Time Zone Method
This method is used to convert an ISO 8601 time zone string into a TimeSpan
object.
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
The specified string converted to a time span
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public static TimeSpan FromISO8601TimeZone(
string timeZone
)VB
Public Shared Function FromISO8601TimeZone (
timeZone As String
) As TimeSpanC++
public:
static TimeSpan FromISO8601TimeZone(
String^ timeZone
)F#
static member FromISO8601TimeZone :
timeZone : string -> TimeSpan Parameters
- timeZone String
- The ISO 8601 formatted time zone to parse
Return Value
TimeSpanThe specified string converted to a time span
Remarks
The string should be in the form +HH:MM or -HH:MM. The sign (+/-) and time separator (:)
are optional as are the minutes. If minutes are not present, they are defaulted to zero.
Exceptions
| ArgumentException | This is thrown if the specified time zone string is not valid |