now

Returns the current server timestamp, in Epoch-millis format.


Copied to clipboard!
now([options]);

Arguments Type Description
options
object
Query options

Options

Additional query options

Property Type
(default)
Description
queuable
boolean

(true)
If true, queues the request during downtime, until connected to Kuzzle again

Resolve

Resolves to a number representing the current server timestamp in Epoch-millis format.

Usage

Copied to clipboard!
try {
  const timestamp = await kuzzle.server.now();

  console.log('Epoch-millis timestamp:', timestamp);
} catch (error) {
  console.error(error.message);
}