mattjohnsonpint/TimeZoneConverter

System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.

logeshpalani30 opened this issue · 1 comments

When am trying to get timezoneinfo using below code, it throws not found

TimeZoneInfo timeZoneInfo = TZConvert.GetTimeZoneInfo("(US & Canada) Central Standard Time");

exception
System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.

That's because you supplied a display name, not an identifier. Only valid IANA or Windows time zone IDs are accepted.