How to add minutes to moment js while looping

Hi @theToncheff!

Here’s how I just did it:

if(!pm.variables.has('time')){
    pm.variables.set('time',moment());
}

var time = moment(pm.variables.get('time'));
console.log('Time: ' + time.format());

time.add(15,'minutes');
console.log('Time + 15: ' + time.format());

pm.variables.set('time',time); 

You could easily change pm.variables.<method> to pm.environment.<method> if you want.