Get(CurrentTimeUTCMicroseconds)

Returns the current time in Coordinated Universal Time (UTC) to the nearest microsecond.

Format 

Get ( CurrentTimeUTCMicroseconds )

Parameters 

None

Data type returned 

number, time

Originated in version 

19.6

Description 

Returns the current time without time zone adjustments in the form of the number of microseconds since 1/1/0001. UTC time zone adjustments must be applied to return your local time.

Notes 

  • In client-server and peer-to-peer environments, this function evaluates the status of the client machine running the script (not the host machine).

Example 1 

Calculates the amount of time it takes to find and sort records as specified in the script.

Copy
Set Variable [$START ; Get ( CurrentTimeUTCMicroseconds )]
Go to Layout ["Invoices"]
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Set Variable [$END ; Get ( CurrentTimeUTCMicroseconds )]
Show Custom Dialog ["Script Duration" ; ( $END - $START ) & " microseconds"]

Example 2 

Calculates the local time for the specified time zone. When the time in UTC is 08:43:55.304 and TimeAdjustment contains -7:

GetAsTime ( GetAsTimestamp ( Get ( CurrentTimeUTCMicroseconds ) / 1000000 ) + ( Location::TimeAdjustment * 3600 ) ) returns 1:43:55.304 PM.