How to convert a string containing a EDT related instant to a DateTime?

时光毁灭记忆、已成空白 提交于 2019-12-12 23:05:19

问题


I have a string in this format:

"Fri, 18 Mar 2011 18:53:15 EDT"

I want to convert this to datetime object, the problem is with EDT, at the end. If I use GMT DateTime.TryParse works fine, but if it is something else like EDT, it return false.


回答1:


Check out the TimeZoneInfo class and this question, or the definitive time zone guide.



来源:https://stackoverflow.com/questions/5358774/how-to-convert-a-string-containing-a-edt-related-instant-to-a-datetime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!