Skip to content

Instantly share code, notes, and snippets.

@AJ-7885
Created December 15, 2018 01:01
Show Gist options
  • Save AJ-7885/a7e10d6f2f7dffa26281ff3fffe46479 to your computer and use it in GitHub Desktop.
Save AJ-7885/a7e10d6f2f7dffa26281ff3fffe46479 to your computer and use it in GitHub Desktop.
var time = new Date();
console.info(time.toUTCString());
time.setMinutes(time.getUTCMinutes() - 60);
console.info(time.toUTCString());
console.info(time.getUTCFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getUTCDate() + ' ' + time.getUTCHours() + ':' + time.getUTCMinutes() + ':' + time.getUTCSeconds());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment