To illustrate, suppose we generate a culture-insensitive DateTime string s as follows:
using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
string s = DateTime.Now.ToString("o");
Console.WriteLine(s);
DateTime dt1 = DateTime.ParseExact(s, "o", null);
Console.WriteLine(dt1);
}
}
The output:
2010-12-15T13:09:49.7744687-08:00
12/15/2010 1:09:49 PM