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 显示当前时区 ID。
/s <timezoneID>[_dstoff] 使用指定的时区 ID 设置当前时区。 _dstoff 后缀禁用时区的夏令时调整(如果适用)。 值必须用引号引起来。
/l 列出所有有效的时区 ID 和显示名称。 输出如下所示:
  • <display name>
  • <time zone ID>
/? 在命令提示符下显示帮助。

注解

退出代码为 0 表示命令已成功完成。

示例

若要显示当前时区 ID,请键入:

tzutil /g

若要将当前时区设置为太平洋标准时间,请键入:

tzutil /s "Pacific Standard time"

若要将当前时区设置为太平洋标准时间并禁用夏令时调整,请键入:

tzutil /s "Pacific Standard time_dstoff"