Now

Now( )
Now( )
Now( )
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.

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. When doing a temporal query, Now means the current time of the query, not the current time.

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:

System.out.println(
    client.query(
        Now()
    ).get()
);
client.query(
  q.Now()
).then((ret) => console.log(ret))
println(Await.result(
  client.query(
    Now()
  ),
  5.seconds
))
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
Not available in this language yet.
2019-10-02T19:34:56.789012Z
Time("2019-10-02T19:34:56.789012Z")
2019-10-02T19:34:56.789012Z

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!