[]
        
(Showing Draft Content)

C1.Schedule.TimeZoneInfo.ToUniversalTime

ToUniversalTime Method

ToUniversalTime(DateTime)

Converts the value of the local time to UTC time. Note that there may be different possible interpretations at the daylight time boundaries.

Declaration
public DateTime ToUniversalTime(DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime

The local time to convert.

Returns
Type Description
DateTime

The UTC DateTime.

Exceptions
Type Condition
ArgumentException

dateTime.Kind is Utc and current time zone does not equal Utc -or- dateTime.Kind is Local and current time zone does not equal Local -or- dateTime value represents invalid time.