SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the overloaded constructor of DateTime:
DateTime
DateTime utcDateTime = new DateTime(dateTime.Year, dateTime.Month, dateTime.Day, dateTime.Hour, dateTime.Minute, dateTime.Second, DateTimeKind.Utc);