The xtk:session schema contains APIs to manage sessions and connections to the Campaign server, plus some other general purpose APIs.
The xtk:session schema contains all the methods for logging on and off. They are described in more details in the Connecting to Campaign page
The xtk:session#GetServerTime API call returns the current data/time in the server (i.e. database) referential. This is a useful function to use to make sure all timestamps are in the same referential.
const timestamp = await NLWS.xtkSession.getServerTime(); console.log(`>> Server timestamp (UTC): ${timestamp.toUTCString()}`); console.log(`>> Server timestamp (localized): ${timestamp}`);