This commit is contained in:
Julian Lam
2019-03-19 15:42:33 -04:00
parent c37b2f2ed3
commit c289b904e6
2 changed files with 14 additions and 7 deletions

View File

@@ -62,7 +62,12 @@ function leaveCurrentRoom(socket) {
SocketMeta.getServerTime = function (socket, data, callback) {
// Returns server time in milliseconds
callback(null, Date.now());
const now = new Date();
callback(null, {
timestamp: now.getTime(),
offset: now.getTimezoneOffset(),
});
};
module.exports = SocketMeta;