I have searched on internet but unable to find this answer for this specific question.
This question is different from others because we don't know whether parsing string contains EST, PST at compile time. I am parsing RSS Feed's for a lot of sites and expecting pub date of some RSS in this format I want to parse this kind of format
Wed, 02 Oct 2002 08:00:00 EST
The problem is that i can not parse EST, PST etc when they come on run time.
The only solution left is to use a switch like this
so when PST comes at the end of string, i use forexample
string TimeZone="";
string LastThreeChar=raw.substring(raw.length-4,3);
switch(LastTHreeChar)
{
case 'PST':
TimeZone= "Pacific Standard Time";
break;
}
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById(TimeZone);
Kindly help me.