Possible Duplicate:
Parse DateTime with timezone of form PST/CEST/UTC/etc
OK, I have following code in Java that converts my Date object into String:
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz");
String str = dateFormat.format(new Date());
// outputs: 2012-12-17 15:44:57 CST
I am sending that String over the wire to WebService written in C#. So, how would I parse back that String into valid DateTime considering that following doesn't work because zzz in C# is different:
DateTime.ParseExact(parts[2], "yyyy-MM-dd HH:mm:ss zzz", CultureInfo.InvariantCulture.DateTimeFormat);
And before anyone suggests it - I know I can go with UTC time, but I need to do it this way.
Any ideas?