I am setting the locale of my .net application via:
string userLocale = Web.Helpers.LocaleHelpers.GetBestRFC3066Locale(this.Context.Request.UserLanguages);
if (userLocale != String.Empty)
{
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(userLocale);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(userLocale);
}
This works well, so my dates will be displayed in the format based upon the locale i.e.
12/10/2009 for en-gb and 10/12/2009 for us
However when I persist my dates via LinqToSql I need to store these dates in a common format.
Currently when a U.S. user is running the app the date stored in the DB is in U.S. format and when an U.K. user uses the app, its in a U.K. format.
Any suggestions on how best to achieve this?