C# Class newtelligence.DasBlog.Util.WindowsTimeZone

This is a specialization of the abstract TimeZone class that implements time zones based in the time zone information found in Windows.
Inheritance: System.TimeZone
ファイルを表示 Open project: AArnott/dasblog Class Usage Examples

Public Methods

Method Description
FormatAdjustedUniversalTime ( System.DateTime date ) : string

Renders a UTC date time as a local time string, displaying the offset from UTC.

GetDaylightChanges ( int year ) : DaylightTime
GetUtcOffset ( System.DateTime time ) : System.TimeSpan
ToLocalTime ( System.DateTime time ) : System.DateTime

Returns the local time (for this timezone) that corresponds to a specified coordinated universal time (UTC).

ToString ( ) : string
ToUniversalTime ( System.DateTime time ) : System.DateTime

Private Methods

Method Description
GetUtcOffsetFromUniversalTime ( System.DateTime time, bool &isAmbiguousLocalDst ) : long
LoadTimeZonesFromRegistry ( ) : WindowsTimeZoneCollection
LoadTimeZonesFromXml ( ) : WindowsTimeZoneCollection
WindowsTimeZone ( ) : System
WindowsTimeZone ( string displayName, string daylightZoneName, string standardZoneName, int zoneIndex, byte tzi ) : System

Method Details

FormatAdjustedUniversalTime() public method

Renders a UTC date time as a local time string, displaying the offset from UTC.
public FormatAdjustedUniversalTime ( System.DateTime date ) : string
date System.DateTime
return string

GetDaylightChanges() public method

public GetDaylightChanges ( int year ) : DaylightTime
year int
return System.Globalization.DaylightTime

GetUtcOffset() public method

public GetUtcOffset ( System.DateTime time ) : System.TimeSpan
time System.DateTime
return System.TimeSpan

ToLocalTime() public method

Returns the local time (for this timezone) that corresponds to a specified coordinated universal time (UTC).
public ToLocalTime ( System.DateTime time ) : System.DateTime
time System.DateTime A UTC time.
return System.DateTime

ToString() public method

public ToString ( ) : string
return string

ToUniversalTime() public method

public ToUniversalTime ( System.DateTime time ) : System.DateTime
time System.DateTime
return System.DateTime