Scheduler for WinForms | ComponentOne
C1.ScheduleCore Assembly / C1.Schedule Namespace / TimeZoneInfo Class / ToUniversalTime Method

In This Topic
    ToUniversalTime Method (TimeZoneInfo)
    In This Topic
    Converts the value of the local time to UTC time. Note that there may be different possible interpretations at the daylight time boundaries.
    Syntax
    'Declaration
     
    Public Function ToUniversalTime( _
       ByVal dateTime As System.Date _
    ) As System.Date
    public System.DateTime ToUniversalTime( 
       System.DateTime dateTime
    )

    Parameters

    dateTime

    Return Value

    The UTC DateTime.
    Exceptions
    ExceptionDescription
    dateTime.Kind is Utc and current time zone does not equal Utc -or- dateTime.Kind is Local and curernt time zome does not equal Local -or- dateTime value represents invalid time.
    See Also