asp.net.ph

TimeZone.CurrentTimeZone Property

System Namespace   TimeZone Structure


Gets the time zone of the current computer system.

[ VB ]
Public Shared ReadOnly Property CurrentTimeZone As TimeZone

[ C# ]
public static TimeZone CurrentTimeZone { get; }

[ C++ ]
public:
static property TimeZone^ CurrentTimeZone {
   TimeZone^ get ( );
}

[ JScript ]
public static function get CurrentTimeZone ( ) : TimeZone

Property Value

A TimeZone instance representing the current, local time zone.

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

TimeZone Members   StandardName Property   DaylightName Property   GetUtcOffset Method 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