I use moment.js
to get UTC time in Postman.
The initial test will validate the format.
But as I go through the user journey and run more tests I need to get the same time but edit the format in order to validate it in later test cases.
Here is the prerequisite script I use for the initial test:
var moment = require('moment');
pm.globals.set("PnDStartTime", moment.utc());
var moment = require('moment');
pm.globals.set("PnDendTime+6", moment.utc().add(6, 'hours'));
So I was looking to format after the fact.
I know how to format the value, but not after it was set and moved.