Newer Version Available
getServerTimestamp()
Syntax
Usage
Use getServerTimestamp() to obtain the current system timestamp from the API. Run this call 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 automatically displays the results in your local time based on your time zone settings.
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.