mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
fix: #7473
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user