使用powershell来设置时间

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-date?view=powershell-6

Set-Date "2018-04-17 09:20:28"

 

Set-Date "2018-04-17 09:27:20+08:00"

 

Get-Date

 

https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Management/Set-TimeZone?view=powershell-6

PS C:\Users\clu\Desktop> Get-TimeZone


Id : China Standard Time
DisplayName : (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi
StandardName : China Standard Time
DaylightName : China Daylight Time
BaseUtcOffset : 08:00:00
SupportsDaylightSavingTime : False

 

列出所有的时区

Get-TimeZone -ListAvailable

 

posted @ 2018-04-17 09:22  ChuckLu  阅读(2274)  评论(0编辑  收藏  举报