Newer Version Available

This content describes an older version of this product. View Latest

getServerTimestamp()

Retrieves the current system timestamp (Coordinated Universal Time (UTC) time zone) from the API.

Syntax

Usage

Use getServerTimestamp() to obtain the current system timestamp from the API. You might do this if, for example, you need to use the exact timestamp for timing or data synchronization purposes. When you create() or update() an object, the API uses the system timestamp to update the CreatedDate and LastModifiedDate fields, respectively, in the object.

The getServerTimestamp() call always returns the timestamp in Coordinated Universal Time (UTC) time zone. However, your local system might automatically display the results in your local time based on your time zone settings.

Development tools differ in the way that they handle time data. Some development tools report the local time, while others report only the Coordinated Universal Time (UTC) time zone. To determine how your development tool handles time values, refer to its documentation.

Note

Sample Code—Java

This sample gets the server time and writes it to the console in the user’s local time zone.

Sample Code—C#

This sample gets the server time and writes it to the console in the user’s local time zone.

Arguments

None.