SDK
SDK Javascript v6.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

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);
}