System.TimeZoneNotFoundException error while getting datetime for particular time zone in c#
- 阅读更多 关于 System.TimeZoneNotFoundException error while getting datetime for particular time zone in c#
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've a JSON file which has time_zone parameter. It has values like London, Casablanca, Arizona, Pacific Time (US & Canada) etc. Based on the time_zone , I want to get the DateTime result of that time zone. For example, Current time = 8/3/2015 4:00:00 PM If time_zone = Central Time (US & Canada) then result should be 8/3/2015 3:00:00 PM, If time_zone = Pacific Time (US & Canada) then result should be 8/3/2015 1:00:00 PM, If time_zone = London then result should be 8/3/2015 9:00:00 PM and so on. I want to display the current time as well as