Last active
March 10, 2016 01:17
-
-
Save tfentonz/7175c04d2397d2dfd132 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var date = new Date(); | |
var dateString = [date.getFullYear(), | |
('0' + (date.getMonth() + 1)).slice(-2), | |
('0' + date.getDate()).slice(-2)].join('/'); | |
dateString += ' '; | |
dateString += [('0' + date.getUTCHours()).slice(-2), | |
('0' + date.getUTCMinutes()).slice(-2), | |
('0' + date.getUTCSeconds()).slice(-2)].join(':'); | |
dateString += ' +' + ((date.getTimezoneOffset() / 60) * -100); | |
postman.setGlobalVariable("yourVariable", dateString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment