Is it possible to create a synthetic Timezone GMT+20 in Windows 10?
I'm trying to create a synthetic timezone GMT+20 in Windows 10 (to test our software for extreme client-server TZ difference scenarios):
$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)
And i'm getting
"The TimeSpan parameter must be within plus or minus 14.0 hours."
Is there any way around this?
It is impossible with .NET method TimeZoneInfo.CreateCustomTimeZone , as BaseUtcOffset property should have value between 14 and - 14.
Prove: https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo.baseutcoffset?view=net-5.0