views:

13

answers:

1

In Control Panel-> Regional and language options-> Regional Options-> Standard and formats, there is the list of all the regionals and by clicking the "Customize" button, the user can set the time format

My question is how to get the current and default time format for all the regionals programmelly?

+1  A: 

You can list them through C# like this.

foreach(var cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
    Console.WriteLine("{0}: {1}",
                      cultureInfo.Name,
                      cultureInfo.IsNeutralCulture ? "-" : cultureInfo.DateTimeFormat.ShortDatePattern);
}
Sam