GetTimeInfo

This command will retrieve the Offset value which is the difference of the device time and UTC in minutes. (The offset is NOT the difference between the device time and server time in UTC.)

You can call the function from an event such as  a button click. 

DeviceTime can use the normal date formatting functions, but by default it will be formatted like “11/1/2017 8:52:12 AM”.

Group: Device Extensions


Syntax: [bOK =] Device.GetTimeInfo([vDeviceTime],[MinutesFromUTC])

bOK              (Boolean) – returns a True if the mobile device successfully obtains the offset value. False if it fails.

vDateTime     (Varient) – Returns the value in minutes.

Example:

This is an example of a pop up message box showing the device’s time and UTC offset:

Dim DeviceTime As Date

Dim MinutesFromUTC As Integer

Device.GetTimeInfo(DeviceTime, MinutesFromUTC)

App.MsgBox("Device Time = " & DeviceTime & ", which is " & MinutesFromUTC & " minutes from UTC")