Udostępnij za pośrednictwem


Calendar.TimeZoneAsString Method

Definition

Overloads

TimeZoneAsString()

Returns the full time zone name applicable at the instant of time that this Calendar object represents.

TimeZoneAsString(Int32)

Returns the abbreviated time zone name applicable at the instant of time that this Calendar object represents.

TimeZoneAsString()

Returns the full time zone name applicable at the instant of time that this Calendar object represents.

public:
 virtual Platform::String ^ TimeZoneAsString() = TimeZoneAsString;
/// [Windows.Foundation.Metadata.Overload("TimeZoneAsFullString")]
winrt::hstring TimeZoneAsString();
[Windows.Foundation.Metadata.Overload("TimeZoneAsFullString")]
public string TimeZoneAsString();
function timeZoneAsString()
Public Function TimeZoneAsString () As String

Returns

String

Platform::String

winrt::hstring

The full time zone name. This usually differs depending on whether the time zone is observing Daylight Saving Time or not. It also may differ due to historical changes. (An example is "America/Los_Angeles" for Pacific Time.)

Attributes

See also

Applies to

TimeZoneAsString(Int32)

Returns the abbreviated time zone name applicable at the instant of time that this Calendar object represents.

public:
 virtual Platform::String ^ TimeZoneAsString(int idealLength) = TimeZoneAsString;
/// [Windows.Foundation.Metadata.Overload("TimeZoneAsString")]
winrt::hstring TimeZoneAsString(int const& idealLength);
[Windows.Foundation.Metadata.Overload("TimeZoneAsString")]
public string TimeZoneAsString(int idealLength);
function timeZoneAsString(idealLength)
Public Function TimeZoneAsString (idealLength As Integer) As String

Parameters

idealLength
Int32

int

The desired length of the abbreviation to be returned. Use 0 to request the abbreviation in most common use.

Returns

String

Platform::String

winrt::hstring

The time zone abbreviation that is closest in length to idealLength. If there is a tie, the shorter abbreviation is returned. If idealLength is 0, the abbreviation in most common use is returned. (An example is "America/Los_Angeles" for Pacific Time.)

Attributes

See also

Applies to