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.


now([options]);

ArgumentsTypeDescription
options
object
Query options

Options #

Additional query options

PropertyType
(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 #

try {
  const timestamp = await kuzzle.server.now();
  console.log('Epoch-millis timestamp:', timestamp);
} catch (error) {
  console.error(error.message);
}