I'm trying to convert a string to DateTime. The string includes the Time zone.
here is how it looks like
HH:mm (time zone)
04:47 (CEST).
The timezone isn't always the same. I have tried using an array of formats, but is there any better way to convert that? I also readed the microsoft doc but couldn't find any way to convert this one
Tryed
string[] formats = new[] { "HH:mm (CEST)", "HH:mm (CET)" };
var processedData = DateTime.ParseExact(
"04:47 (CEST)",
formats,
CultureInfo.InvariantCulture,
DateTimeStyles.None);
Console.WriteLine(processedData);