How to convert DateTime of type DateTimeKind.Unspecified to DateTime.Kind.Utc in C# (.NET)
I've inherited C# code that has an awful lot of DateTimes where the Kind property is DateTimeKind.Unspecified. These are fed into Datetime.ToUniversalTime() which gives back a UTC datetime (it adds 7 hours in my case). This is how ToUniversalTime() works; see MSDN. The problem is that these DateTimes are in fact already in UTC time. They are pulled out of a SQL Server Compact 4.0 database. They were stored there in UTC. My main question is: How do I modify the Kind property of a DateTime so that it's UTC and not Unspecified? I don't want to change the time or date. So for example, a date of