VTimeZone Class

The definition of a time zone of an iCalendar object (VTIMEZONE): its observances (STANDARD and DAYLIGHT), with their offsets and the rules of their onsets.

public sealed class VTimeZone : CalendarComponent
Inheritance
CalendarComponent VTimeZone

Constructors

NameDescription
VTimeZone()Creates a time zone.

VTimeZone()

VTimeZone.cs

Creates a time zone.

public VTimeZone()

Properties

NameDescription
IdGets or sets the identifier of the time zone (TZID), which the local times refer to.

Gets or sets the identifier of the time zone (TZID), which the local times refer to.

public string? Id { get; set; }

Property value

string?

Methods

NameDescription
GetUtcOffset(DateTime)Returns the offset from UTC of a local time: the offset of the observance whose last onset is before the time.

GetUtcOffset(DateTime)

VTimeZone.cs

Returns the offset from UTC of a local time: the offset of the observance whose last onset is before the time.

public TimeSpan? GetUtcOffset(DateTime localTime)

Parameters

localTime DateTime
The local time.

Returns

TimeSpan? The offset, or null when the time zone has no observance with an offset.