Time
How to implement time correctly in your app.
You can fetch the time from the Monterosa SDK, which retrieves it from EnMasse in UTC format. This can be used to unify countdown clocks or other time sensitive features.
We strongly recommend avoiding use of local time for your applications and instead rely on server time available via this method
var interact = Interact.default
let currentTime = interact.getServerTime()val interact = InteractKit.default
val currentTime = interact.connect.getServerTime()The timestamp is first set using the local Date.now() when there’s no communication with the Enmasse server and later updated with the precise, low-latency timestamp from the Enmasse message handshake.
import { now } from '@monterosa/sdk-util';
now();The timestamp is first set using the local Date.now() when there’s no communication with the Enmasse server and later updated with the precise, low-latency timestamp from the Enmasse message handshake.
import { now } from '@monterosa-sdk/util';
now();Last updated

