Class UtcOffset
A UTC offset value (RFC 5545 §3.3.14), the difference between local time and UTC.
Serialized as +HHMM or -HHMM (optionally with seconds:
+HHMMSS).
Inherited Members
Namespace: DRIT.Mail.Rfc.ICal
Assembly: DRIT.Mail.dll
Syntax
public sealed class UtcOffset
Constructors
View SourceUtcOffset(TimeSpan)
Initializes a new instance of the UtcOffset class.
Declaration
public UtcOffset(TimeSpan offset)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | offset | The offset from UTC. |
Properties
View SourceOffset
Gets the offset from UTC.
Declaration
public TimeSpan Offset { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
View SourceParse(string)
Parses a UTC offset string (RFC 5545 §3.3.14). Supports +HHMM,
-HHMM, and +HHMMSS / -HHMMSS.
Declaration
public static UtcOffset Parse(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Specifies the text value. |
Returns
| Type | Description |
|---|---|
| UtcOffset |
ToString()
Formats this offset for iCalendar serialization (e.g. +0200).
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |