Show / Hide Table of Contents

Class TimeZoneData

Represents metadata for a timezone including daylight savings time history

Inheritance
System.Object
TimeZoneData
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Innovator.Client
Assembly: Innovator.Client.dll
Syntax
public class TimeZoneData : IEquatable<TimeZoneData>

Properties

| Improve this Doc View Source

Id

Gets the time zone identifier.

Declaration
public string Id { get; }
Property Value
Type Description
System.String

The time zone identifier.

| Improve this Doc View Source

Local

Gets time zone information for the local time zone.

Declaration
public static TimeZoneData Local { get; }
Property Value
Type Description
TimeZoneData

The time zone information for the local time zone.

| Improve this Doc View Source

Utc

Gets time zone information for the UTC time zone.

Declaration
public static TimeZoneData Utc { get; }
Property Value
Type Description
TimeZoneData

The time zone information for the UTC time zone.

Methods

| Improve this Doc View Source

ById(String)

Retrieves a TimeZoneData object from the registry based on its identifier.

Declaration
public static TimeZoneData ById(string value)
Parameters
Type Name Description
System.String value

The time zone identifier, which corresponds to the Id property.

Returns
Type Description
TimeZoneData

An object whose identifier is the value of the value parameter.

Exceptions
Type Condition
System.OutOfMemoryException

The system does not have enough memory to hold information about the time zone.

System.ArgumentNullException

The value parameter is null

| Improve this Doc View Source

ConvertTime(DateTime, TimeZoneData, TimeZoneData)

Converts a time from one time zone to another.

Declaration
public static DateTime ConvertTime(DateTime value, TimeZoneData from, TimeZoneData to)
Parameters
Type Name Description
System.DateTime value

The date and time to convert.

TimeZoneData from

The time zone of value.

TimeZoneData to

The time zone to convert value to.

Returns
Type Description
System.DateTime

The date and time in the destination time zone that corresponds to the value parameter in the source time zone.

Exceptions
Type Condition
System.ArgumentException

The System.DateTime.Kind property of the value parameter is System.DateTimeKind.Local, but the from parameter does not equal System.DateTimeKind.Local. -or- The System.DateTime.Kind property of the value parameter is System.DateTimeKind.Utc, but the from parameter does not equal Utc -or- The value parameter is an invalid time (that is, it represents a time that does not exist because of a time zone's adjustment rules).

System.ArgumentNullException

The fromparameter is null. -or- The to parameter is null.

| Improve this Doc View Source

ConvertTime(DateTimeOffset, TimeZoneData)

Converts a time to the time in a particular time zone.

Declaration
public static DateTimeOffset ConvertTime(DateTimeOffset value, TimeZoneData to)
Parameters
Type Name Description
System.DateTimeOffset value

The date and time to convert.

TimeZoneData to

The time zone to convert dateTime to.

Returns
Type Description
System.DateTimeOffset

The date and time in the destination time zone.

Exceptions
Type Condition
System.ArgumentNullException

The value of the to parameter is null.

| Improve this Doc View Source

Equals(TimeZoneData)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(TimeZoneData other)
Parameters
Type Name Description
TimeZoneData other

An object to compare with this object.

Returns
Type Description
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

Implements
System.IEquatable<T>.Equals(T)
| Improve this Doc View Source

Equals(Object)

Determines whether the specified System.Object, is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

GetUtcOffset(DateTime)

Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.

Declaration
public TimeSpan GetUtcOffset(DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

The date and time to determine the offset for.

Returns
Type Description
System.TimeSpan

An object that indicates the time difference between the two time zones.

Operators

| Improve this Doc View Source

Equality(TimeZoneData, TimeZoneData)

Implements the operator ==.

Declaration
public static bool operator ==(TimeZoneData a, TimeZoneData b)
Parameters
Type Name Description
TimeZoneData a

a.

TimeZoneData b

The b.

Returns
Type Description
System.Boolean

The result of the operator.

| Improve this Doc View Source

Inequality(TimeZoneData, TimeZoneData)

Implements the operator !=.

Declaration
public static bool operator !=(TimeZoneData a, TimeZoneData b)
Parameters
Type Name Description
TimeZoneData a

a.

TimeZoneData b

The b.

Returns
Type Description
System.Boolean

The result of the operator.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX