Show / Hide Table of Contents

Class Time​Zone​Data

Represents metadata for a timezone including daylight savings time history

Inheritance
System.​Object
Time​Zone​Data
Inherited Members
System.​Object.​Equals(System.​Object, System.​Object)
System.​Object.​Get​Type()
System.​Object.​Memberwise​Clone()
System.​Object.​Reference​Equals(System.​Object, System.​Object)
System.​Object.​To​String()
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
Time​Zone​Data

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
Time​Zone​Data

The time zone information for the UTC time zone.

Methods

| Improve this Doc View Source

ById(String)

Retrieves a Time​Zone​Data 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
Time​Zone​Data

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

Exceptions
Type Condition
System.​Out​Of​Memory​Exception

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

System.​Argument​Null​Exception

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.​Date​Time value

The date and time to convert.

Time​Zone​Data from

The time zone of value.

Time​Zone​Data to

The time zone to convert value to.

Returns
Type Description
System.​Date​Time

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

Exceptions
Type Condition
System.​Argument​Exception

The System.​Date​Time.​Kind property of the value parameter is System.​Date​Time​Kind.​Local, but the from parameter does not equal System.​Date​Time​Kind.​Local. -or- The System.​Date​Time.​Kind property of the value parameter is System.​Date​Time​Kind.​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.​Argument​Null​Exception

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.​Date​Time​Offset value

The date and time to convert.

Time​Zone​Data to

The time zone to convert dateTime to.

Returns
Type Description
System.​Date​Time​Offset

The date and time in the destination time zone.

Exceptions
Type Condition
System.​Argument​Null​Exception

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
Time​Zone​Data 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.​Get​Hash​Code()
| 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.​Date​Time dateTime

The date and time to determine the offset for.

Returns
Type Description
System.​Time​Span

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
Time​Zone​Data a

a.

Time​Zone​Data 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
Time​Zone​Data a

a.

Time​Zone​Data b

The b.

Returns
Type Description
System.​Boolean

The result of the operator.

  • Improve this Doc
  • View Source
In This Article
  • Properties
    • Id
    • Local
    • Utc
  • Methods
    • ById(String)
    • ConvertTime(DateTime, TimeZoneData, TimeZoneData)
    • ConvertTime(DateTimeOffset, TimeZoneData)
    • Equals(TimeZoneData)
    • Equals(Object)
    • GetHashCode()
    • GetUtcOffset(DateTime)
  • Operators
    • Equality(TimeZoneData, TimeZoneData)
    • Inequality(TimeZoneData, TimeZoneData)
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX