我正在尝试在 Windows 10 中创建一个合成时区 GMT+20(以测试我们的软件以应对极端的客户端-服务器 TZ 差异场景):
$standardDisplayName = "(GMT+20:00) Synthetic 20"
$standardName = "My Time"
$baseUtcOffset = New-TimeSpan -Hours 20
$daylightDisplayName=[string]::Empty
$adjustmentRules=$null
$disableDaylightSavingTime=$false
$newTZ = [TimeZoneInfo]::CreateCustomTimeZone($standardName, $baseUtcOffset, $standardDisplayName, $standardName,$daylightDisplayName,$adjustmentRules,$disableDaylightSavingTime)
我得到了
"The TimeSpan parameter must be within plus or minus 14.0 hours."
有没有办法解决?