# OutlookTimeZoneDefinition

Typed Outlook TZDEFINITION with lossless native-state retention.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OutlookTimeZone.cs:181](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L181)

**Modifiers**

sealed

Typed Outlook TZDEFINITION with lossless native-state retention.

## Inheritance

- object
- OutlookTimeZoneDefinition

## Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 6

- Property [OutlookAppointment.EndTimeZone](/api/email/officeimo-email-outlookappointment/#property-endtimezone)
- Property [OutlookAppointment.RecurrenceTimeZone](/api/email/officeimo-email-outlookappointment/#property-recurrencetimezone)
- Property [OutlookAppointment.StartTimeZone](/api/email/officeimo-email-outlookappointment/#property-starttimezone)
- Property [OutlookRecurrenceIcsExportOptions.TimeZone](/api/email/officeimo-email-outlookrecurrenceicsexportoptions/#property-timezone)
- Property [OutlookRecurrenceIcsImportOptions.TimeZone](/api/email/officeimo-email-outlookrecurrenceicsimportoptions/#property-timezone)
- Method [OutlookTimeZoneBinary.DecodeDefinition](/api/email/officeimo-email-outlooktimezonebinary/#method-decodedefinition-byte)

### Accepted by parameters 4

- Method [OutlookRecurrenceOccurrence.ResolveEnd](/api/email/officeimo-email-outlookrecurrenceoccurrence/#method-resolveend-officeimo-email-outlooktimezonedefinition-officeimo-email-outlookambiguoustimepolicy) parameter `timeZone`
- Method [OutlookRecurrenceOccurrence.ResolveStart](/api/email/officeimo-email-outlookrecurrenceoccurrence/#method-resolvestart-officeimo-email-outlooktimezonedefinition-officeimo-email-outlookambiguoustimepolicy) parameter `timeZone`
- Method [OutlookTimeZoneBinary.EncodeDefinition](/api/email/officeimo-email-outlooktimezonebinary/#method-encodedefinition-officeimo-email-outlooktimezonedefinition) parameter `definition`
- Method [OutlookTimeZoneConsistency.Compare](/api/email/officeimo-email-outlooktimezoneconsistency/#method-compare-officeimo-email-outlooktimezonestructure-officeimo-email-outlooktimezonedefinition-int32) parameter `definition`

Filter members 

Show inherited

## Constructors

`public OutlookTimeZoneDefinition()` [#](#constructor-ctor)

[OutlookTimeZone.cs:181](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L181)

Creates an editable definition.

## Methods

`public DateTimeOffset ConvertUtc(DateTimeOffset utcValue)` [#](#method-convertutc-datetimeoffset)

[OutlookTimeZone.cs:217](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L217)

Converts a UTC instant using the embedded historical rules.

Parameters

**utcValue System.DateTimeOffset required**

Returns

`DateTimeOffset`

`public OutlookLocalTimeResolution GetLocalTimeResolution(DateTime localTime)` [#](#method-getlocaltimeresolution-datetime)

[OutlookTimeZone.cs:208](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L208)

Classifies a local clock value without consulting the host time zone.

Parameters

**localTime System.DateTime required**

Returns

`OutlookLocalTimeResolution`

`public OutlookTimeZoneRule GetRule(int localYear)` [#](#method-getrule-int32)

[OutlookTimeZone.cs:200](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L200)

Returns the rule effective for a local year.

Parameters

**localYear int required**

Returns

`OutlookTimeZoneRule`

`public DateTimeOffset ResolveLocal(DateTime localTime, OutlookAmbiguousTimePolicy policy = EarlierUtc)` [#](#method-resolvelocal-datetime-officeimo-email-outlookambiguoustimepolicy)

[OutlookTimeZone.cs:213](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L213)

Resolves a local clock value using an explicit ambiguity policy.

Parameters

**localTime System.DateTime required**

**policy OfficeIMO.Email.OutlookAmbiguousTimePolicy = EarlierUtc optional**

Returns

`DateTimeOffset`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string? KeyName { get; set; }` [#](#property-keyname)

[OutlookTimeZone.cs:187](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L187)

Windows time-zone key carried by Outlook.

`public IList<OutlookTimeZoneRule> Rules { get; }` [#](#property-rules)

[OutlookTimeZone.cs:189](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L189)

Rules ordered by effective year.

`public bool StateDecoded { get; internal set; }` [#](#property-statedecoded)

[OutlookTimeZone.cs:191](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L191)

Whether the native BLOB decoded completely.

`public string? DecodeError { get; internal set; }` [#](#property-decodeerror)

[OutlookTimeZone.cs:193](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L193)

Decode failure for retained native input.

`public byte[]? RawState { get; internal set; }` [#](#property-rawstate)

[OutlookTimeZone.cs:195](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Outlook/OutlookTimeZone.cs#L195)

Original TZDEFINITION bytes.

<!-- PowerForge markdown artifact sha256:B2676AF65FE56A60FFA0BC6A445A3F30DFB7709A8AAC9741D8107E15A9350F15 -->
