Method ToUniversalTime
ToUniversalTime(DateTime)
Converts a DateTime to UTC (with special handling for MinValue and MaxValue).
public static DateTime ToUniversalTime(DateTime dateTime)
Parameters
dateTime
DateTimeA DateTime.
Returns
- DateTime
The DateTime in UTC.