SDK
SDK Android v3.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) #

ArgumentsTypeDescription
optionsJSON ObjectOptional parameters
callbackfunctionCallback handling the response

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

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

Usage #

kuzzle.now(new ResponseListener<Date>() {
  @Override
  public void onSuccess(Date object) {
    // 'object' contains the Kuzzle timestamp (utc, in milliseconds)
  }
  @Override
  public void onError(JSONObject error) {
    // Handle error
  }
});

Callback response:

1447151167622