GetCommitTime
Returns the time used for the history timestamp when the action is committed.
The CQEntity::GetCommitTime and CQEntity::GetCommitTimeAsString methods work together. The return value of these APIs is the time used for the history timestamp when the action is committed. This time is obtained from the database server, thereby avoiding issues related to variations in the clocks on client machines. The only difference between the two APIs is the type of the return value and that the string form can optionally be represented as local or GMT, and optionally with a time zone suffix.
These APIs can be used only during an action's validation, commit, or notification phases. If called at any other time, an exception will be thrown.
The value returned by these APIs is constant for the duration of the action. The first time either one is called during the validation or later phase of an action, the current time is obtained from the database server and stored in memory with the entity. Any subsequent calls will return that same value until the action is complete. If validation fails, the value will be cleared such that the next time either API is called during a validation or later action phase, and a new value will be obtained from the database server and returned.
Syntax
Perl
$entity->GetCommitTime();
- Identifier
- Description
- entity
-
An Entity object.
- Return value
- A Long containing the Entity object of the time used for the history timestamp when the action is committed. This time is obtained from the database server, thereby avoiding issues related to variations in the clocks on client machines.