tzutil

適用於:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

顯示 Windows 時區公用程式。

語法

tzutil [/?] [/g] [/s <timezoneID>[_dstoff]] [/l]

參數

參數 描述
/g 顯示目前的時區識別碼。
/s <timezoneID>[_dstoff] 使用指定的時區識別碼來設定目前的時區。 _dstoff 尾碼會停用時區的日光節約時間調整 (如果適用)。 必須以引號括住值。
/l 列出全部有效的時區識別碼和顯示名稱。 輸出會顯示為:
  • <display name>
  • <time zone ID>
/? 在命令提示字元顯示說明。

備註

結束代碼 0 表示命令已順利完成。

範例

若要顯示目前的時區識別碼,請輸入:

tzutil /g

若要將目前時區設定為太平洋標準時間,請輸入:

tzutil /s "Pacific Standard time"

若要將目前的時區設定為太平洋標準時間,並停用日光節約時間調整,請輸入:

tzutil /s "Pacific Standard time_dstoff"