const moment = require('moment-timezone'); // it substract 5 minutes in the current time moment().subtract(5, 'minutes');
// This gives you the current datetime, without seconds or milliseconds. moment().seconds(0).milliseconds(0).toISOString();