标签: c# datetime timezone xml-parsing
如果我有2011-05-05T11:35:47.743-04:00
2011-05-05T11:35:47.743-04:00
当我以编程方式执行DateTime.ParseExact时,如何忽略时区(-04:00)?
答案 0 :(得分:19)
DateTimeOffset dt =DateTimeOffset.Parse("2011-05-05T11:35:47.743-04:00", null);