I’m trying to parse an international datetime string similar to:
24-okt-08 21:09:06 CEST
So far I’ve got something like:
CultureInfo culture = CultureInfo.CreateSpecificCulture('nl-BE'); DateTime dt = DateTime.ParseExact('24-okt-08 21:09:06 CEST', 'dd-MMM-yy HH:mm:ss ...', culture);
The problem is what should I use for the ‘…’ in the format string? Looking at the Custom Date and Time Format String MSDN page doesn’t seem to list a format string for parsing timezones in PST/CEST/GMT/UTC form.
AFAIK the time zone abbreviations are not recognized. However if you replace the abbreviation with the time zone offset, it will be OK. E.g.: