Timestamp

Description

Timestamp task generates 13 digits ESTTimestamp - count of milliseconds since the epoch (in UTC). The epoch is January 1st of 1970.

Parameters

Attribute Description Default Required
outputproperty The property to receive the timestamp string. None Yes

Timestamp task can be used to generate unique identifier or TransactTime value for the ITCH messages. In order to receive the value with some offset (posisitve or negative) use Math Ant task. See example below.

In order to receive date / time value in other forat use Tstamp Ant task. See example below.

Examples

Set TransactTime property value to the current EST Timestamp. Then calculate ExpireTime = TransactTime + 5 hours.

	<java classname="Timestamp" outputproperty="TransactTime" fork="false" />
	<math result="ExpireTime" operation="+" operand1="${TransactTime}" operand2="18000000" datatype="long"/>

Set TransactTime property value to the current GMT Time plus 5 hours..

	<tstamp>
      		<format property="TransactTime" pattern="yyyyMMdd-HH:mm:ss.SSS" timezone="GMT" unit="hour" offset="5"/>
	</tstamp>