Skip to content

Instantly share code, notes, and snippets.

@runezero
Created December 9, 2022 08:12
Show Gist options
  • Save runezero/bf773bac20f50a73951557d3989a4c53 to your computer and use it in GitHub Desktop.
Save runezero/bf773bac20f50a73951557d3989a4c53 to your computer and use it in GitHub Desktop.
[Postman Current Date Time] Set a Postman global variable with the current Date and Time in a single variable #tools
const moment = require('moment');
pm.globals.set("currentTime", moment().format("YYYY-MM-DDTHH:mm:ssZ"));
//2022-12-09T09:11:50+01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment