Click or drag to resize

TimeZone Class

Class which holds information about a TimeZone. Both a name and a TimeZoneInfo are included.
Inheritance Hierarchy
SystemObject
  NetQuarryTimeZone

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
[SerializableAttribute]
public class TimeZone : IComparable, ICloneable

The TimeZone type exposes the following members.

Constructors
  NameDescription
Public methodTimeZone
Constructor.
Top
Properties
  NameDescription
Public propertyStatic memberCurrent
Retrieves the TimeZone object based on the current system TimeZone.
Public propertyID
The unique ID for this TimeZone. See TimeZonesZones for constants for common timezones.
Public propertyMapId
The Map ID of this TimeZone as extracted from the Windows Registry.
Public propertyName
The name of the TimeZone.
Public propertyNow
Gets a date/time that is set to the current date and time on this computer, expressed as the time in this TimeZone.
Public propertyObservesDaylightTime
Whether daylight saving time is observed in the timezone
Public propertyOlsonName
Returns the name of the Olson timezone used in iCal attachments. These correspond to the IANA time zone database, often referred to as the Olson database: http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml. These timezone names as strings like America/New_York and Europe/Paris.
Public propertyPriority
When performing timezone detection based on browser UTC offset it is generally impossible to determine a unique timezone since at any point in time there are generally a few timezones for each UTC offest that match. Priority is used to determine which, of multiple matches, to prefer -- highest priority wins. The default priorities are as follows (otherwise zero):
  • 10 - U.S. Standard (primary US timezones)
  • 9 - U.S. Subzones (secondary US timezones, specifically Arizona and Indiana-East)
  • 9 - European common
  • 8 - Canadian
  • 7 - European other
  • 7 - Australian
  • 6 - New Zealand
Note that there is no real chance of collision between most of these groupings, e.g. European, US/Canadian, and Australian/New Zealand. There is some chance of collision between the U.S. primary and secondary timezones in particular.
Public propertyRegIndex
The Index for this TimeZone in the Windows registry.
Public propertyRegKey
The Windows registry key for this TimeZone. Blank or null if this TimeZone was not loaded from the registry.
Public propertyTimeZoneInfo
Gets the internal TimeZoneInfo object for this TimeZone.
Public propertyStatic memberUTC
Retrieves the TimeZone object for the UTC (GMT) timezone.
Top
Methods
  NameDescription
Public methodClone
Create and returns a copy of this object.
Public methodCompareTo
Compares two TimeZone objects for ordering. TimeZones are ordered by ascending Bias.
Public methodConvert(TimeZone, DateTime)
Converts the local time of the current timezone to the local time of the destination timezone.
Public methodStatic memberConvert(TimeZone, TimeZone, DateTime)
Converts the local time of the source timezone to the local time of the destination timezone.
Public methodCurrentOffset
Get the timezone's current offset from UTC (in minutes) taking into account the current state of DaylightTime.
Public methodDump
Dump out a text representation of the TimeZone for debugging purposes.
Public methodEquals
Compares two TimeZone objects for equality.
(Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetDaylightChanges
The daylight time changes for the current timezone
Public methodGetDaylightDateTime
The date of the daylight time change.
Public methodGetDaylightRecurrencePattern
Returns the Daylight time recurrence pattern.
Public methodGetHashCode
Get the bias (offset from UTC, in minutes) for this TimeZone.
(Overrides ObjectGetHashCode.)
Public methodGetStandardDateTime
The date of the standard time change
Public methodGetStandardRecurrencePattern
Returns the standard time recurrence pattern.
Public methodGetTimeZoneName
The name of the current TimeZone structure (Daylight or Standard) based on the date/time.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVTIMEZONE
Returns the VTIMEZONE representing this TimeZone object.
Public methodIsDaylightSavingTime(DateTime)
Returns a value indicating whether the specified date and time is within a daylight saving time period.
Public methodStatic memberIsDaylightSavingTime(DateTime, DaylightTime)
Returns a value indicating whether the specified date and time is within a daylight saving time period.
Public methodStatic memberLoadFromRegistry
Load a TimeZone from the specified Windows registry key.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToLocalTime(DateTime)
Converts the UtcTime to the local time of the current timezone.
Public methodStatic memberToLocalTime(TimeZone, DateTime)
Converts the UtcTime to the local time of the destination timezone.
Public methodToString
Convert the TimeZone into a string.
(Overrides ObjectToString.)
Public methodToUniversalTime(DateTime)
Converts a local time of the current timezone to a Utc time
Public methodStatic memberToUniversalTime(TimeZone, DateTime)
Converts a local time of the source timezone to a Utc time
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Equality operator for TimeZone object.
Public operatorStatic memberInequality
Inequality operator for TimeZone object.
Top
Extension Methods
  NameDescription
Public Extension MethodEqualValue
Determines if the object value is equal to another object. If the two objects are null, then this returns true. There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways). If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.)
Top
See Also