asp.net.ph

TimeZone Class

System Namespace


Represents a time zone.

TimeZone Class Members

Collapse   Properties

Visibility Name Value Type Accessibility
public static CurrentTimeZone TimeZone [ Get ]
public DaylightName String [ Get ]
public StandardName String [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public GetDaylightChanges ( Int32 year ) DaylightTime
public GetUtcOffset ( DateTime time ) TimeSpan
public IsDaylightSavingTime ( DateTime time ) Boolean
public static IsDaylightSavingTime ( DateTime time , DaylightTime daylightTimes ) Boolean
public ToLocalTime ( DateTime time ) DateTime
public ToUniversalTime ( DateTime time ) DateTime

Remarks

A time zone is a geographical region in which the same standard time is used.

Example

The following example gets the values returned by the current time zone set on the Web server.

 Show me 

The following examples show how to determine and set the current local time of a user's browser based on the current time zone setting on the Web server.

This is done basically by calling a client-side JavaScript function to determine the current browser's UTC offset based on the time zone setting of the browser, and then calculating the current browser's local time from the UTC time derived from the time zone setting of the server.

TimeZone.ToUniversalTime Example
Run Sample | View Source
Localization Resource Fallback
Run Sample | View Source
See Also

DateTime Structure   Globalization and Localization Primer Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph