I generate a datetime value from my javascript client to UTC format I need to be able to convert this datetime value into the date and time of particular culture.
I do this to get datetime
new Date().toUTCString(); // "Tue, 13 Jun 2017 07:44:58 GMT"
In my C# console application
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture = new CultureInfo("da-DK");
var dt = DateTime.Parse("Tue, 13 Jun 2017 07:44:58 GMT", Thread.CurrentThread.CurrentCulture);
Console.WriteLine(dt);
I always get the datetime displayed in the time of my zone rather then the cultureinfo value I pass to it.
What I need is when I parse a universal time with a particular culture is to show me the date and time of that particular cultureinfo (danish in the above code). How do I go about this?