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
A TimeZone instance representing the current, local time zone.
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 Members StandardName Property DaylightName Property GetUtcOffset Method