TimeZoneSettings 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含與時區互動的方法和屬性。
public ref class TimeZoneSettings abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.System.SystemManagementContract, 65536)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TimeZoneSettings final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.System.SystemManagementContract), 65536)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class TimeZoneSettings
Public Class TimeZoneSettings
- 繼承
- 屬性
Windows 需求
| 規格需求 | Description |
|---|---|
| 裝置系列 |
Windows IoT Extension SDK (已於 10.0.10240.0 引進)
|
| API contract |
Windows.System.SystemManagementContract (已於 v1.0 引進)
|
| 應用程式功能 |
systemManagement
|
備註
此 API 需要使用 IoT 系統管理 功能。 使用者可以將下列內容新增至其 Package.appmanifest: <iot:Capability Name="systemManagement"/>
版本歷程記錄
| Windows 版本 | SDK 版本 | 已新增值 |
|---|---|---|
| 1803 | 17134 | AutoUpdateTimeZoneAsync |
屬性
| 名稱 | Description |
|---|---|
| CanChangeTimeZone |
取得是否可以變更時區。 |
| CurrentTimeZoneDisplayName |
取得目前時區的顯示名稱。 |
| SupportedTimeZoneDisplayNames |
取得所有支援時區的顯示名稱。 |
方法
| 名稱 | Description |
|---|---|
| AutoUpdateTimeZoneAsync(TimeSpan) |
嘗試自動判斷並設定內嵌模式裝置的時區。 |
| ChangeTimeZoneByDisplayName(String) |
使用顯示名稱變更時區。 |