Now

Copied!
( )

Description

The Now function constructs a Timestamp representing the transaction’s start time.

Multiple calls to Now within a single transaction produce the same timestamp. The transaction’s start time is the same on all nodes that participate in the transaction. During a temporal query, Now still means the transaction’s start time, not the temporal query’s specified timestamp.

Parameters

None.

Returns

A Timestamp which represents the transaction’s start time.

Examples

The following query returns a Timestamp for the transaction’s start time:

Copied!
client.query(
  q.()
).then((ret) => console.log(ret))
("2019-10-02T19:34:56.789012Z")

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!