更新时间:2023-01-22 12:58:12
可以使用moment.js,它使这类事情变得如此简单和易于管理.
You can use the add
function of moment.js within Postman, it makes this type of thing so simple and easy to manage.
var moment = require("moment")
pm.environment.set('pickUpTime', moment().add(10, 'minutes').toISOString())
这将使用较新的语法将此值设置为环境变量.
This will set this value to an environment variable, using the the newer syntax.