SDK
SDK Javascript v5.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 #

Retrieves the current Kuzzle time.


now([options], callback) #

Arguments Type Description
options JSON Object Optional parameters
callback function Callback handling the response

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Callback Response #

Returns an integer containing the current Kuzzle time, encoded as an UTC Epoch time in milliseconds.

Usage #

Copied to clipboard!
// Using callbacks (NodeJS or Web Browser)
kuzzle.now(function (err, res) {
  // 'res' contains the Kuzzle timestamp (utc, in milliseconds)
});
// Using promises (NodeJS only)
kuzzle.nowPromise().then(res => {
  // 'res' contains the Kuzzle timestamp (utc, in milliseconds)
});

Callback response:

Copied to clipboard!
1447151167622