Monday, June 18, 2007

DateTime and TimeZone in .NET

I am trying to deserialize/ Parse a datetime object with the below string "2007-05-14T08:00:00.000+02:30" . If i am in GMT + 2.30 time zone everything's fine however if i am in GMT + 5.30 i get the DateTime object which represents 11.00 AM. Now this is perfectly fine as if i go from GMT +2.30 tp GMT + 5.30 , 8.00 AM becomes 11.00 AM. however this is not what i want to achieve in my program. What i want to achieve is to reconstruct a date time object which gives me the 8.00 AM as clock time.
And i am stuck as off now. Will post the solution if i find any