now #
Returns the current server timestamp, in Epoch-millis format.
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 #
try {
const timestamp = await kuzzle.server.now();
console.log('Epoch-millis timestamp:', timestamp);
} catch (error) {
console.error(error.message);
}
Edit this page on Github(opens new window)