0
pm.sendRequest("http://worldtimeapi.org/api/timezone/Europe/Rome", function (err, res) {
    pm.globals.set("localTimeRome", res.json().datetime);
});

How to increase the number of days after reading the date from this api ?
Future date
previous date
future year

Mister Jojo
  • 20,093
  • 6
  • 21
  • 40
ssryan
  • 1

1 Answers1

0

I hope it is gonna works for you.

const moment = require('moment');

pm.sendRequest("http://worldtimeapi.org/api/timezone/Europe/Rome", function (err, res) {
    var two_days_more = moment.parseZone(res.json().datetime).add(2, 'days');
    pm.globals.set("localTimeRome", two_days_more);
});
slaff.bg
  • 139
  • 1
  • 6