What's the best way to convert a string such as:
Mon Nov 05 2012 21:27:58 GMT+0000 (GMT Standard Time)
in to a DateTime in .NET? I want to retain as much of the date as possible, i.e the TimeZone.
I'm trying this but it loses the GMT:
DateTime.ParseExact(date.Substring(0, 24),
"ddd MMM d yyyy HH:mm:ss",
CultureInfo.InvariantCulture);
DateTimeOffset(which conserves the the offset, but not the time-zone) and a string that represents the timezone. Depending on the format of the string, you might be able to parse the timezone as well.