ISDateTimeUtils.LocalTimeToUTC

Description

This function converts the local date and time to UTC (Coordinated Universal Time).

Syntax

object.LocalTimeToUTC(aLocalTime)

Part Attribute Type Description
object Required
The object always implements the ISDateTimeUtils interface
aLocalTime In, Required
DateTime
The local date and time

Return Value

DateTime

Returns the local date and time converted to UTC.

Example

Display the local date and time converted to UTC.

Dim aDateTimeUtils
Dim aLocalTime
Dim aUTC
Dim aMessage

Set aDateTimeUtils = Profile.DateTimeUtils
aLocalTime = aDateTimeUtils.Now
aUTC = aDateTimeUtils.LocalTimeToUTC(aLocalTime)

aMessage = "Local Time: " & aLocalTime & vbNewLine &_
  "Local Time in UTC: " & aUTC 

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface local date and time in UTC format can be found in Special > World Clock > UTC.

Version information

Added in v8.2.0