dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.32k stars 4.74k forks source link

The type initializer for 'TimeZoneConverter.TZConvert' threw an exception. #25990

Closed liguangkk closed 4 years ago

liguangkk commented 6 years ago

I got this error on aws lambda. The type initializer for 'TimeZoneConverter.TZConvert' threw an exception. "errorMessage": "An item with the same key has already been added. Key: Canada/East-Saskatchewan",

tarekgh commented 6 years ago

@mj1856 could you please look to know if this issue is because of TimeZoneInfo enumeration or it is TimeZoneConverter issue? Thanks.

tarekgh commented 6 years ago

https://github.com/mj1856/TimeZoneConverter

mattjohnsonpint commented 6 years ago

Yeah, should be logged on my repo, not here.

@liguangkk, please log over there. When you do, please give version and code to reproduce. I thought I had addressed this one already. Thanks.

tarekgh commented 6 years ago

@liguangkk could you please add the full stack?

@mj1856 I looked briefly at your code, although I am not sure exactly what the problem is, could it be because of the line

https://github.com/mj1856/TimeZoneConverter/blob/master/src/TimeZoneConverter/TZConvert.cs#L327

which looks we didn't encounter Canada/East-Saskatchewan before but now we do.

I'll move this issue to your repo. Thanks.

tarekgh commented 6 years ago

This issue was moved to mj1856/TimeZoneConverter#28