Skip to content

Instantly share code, notes, and snippets.

@jgornick
Created November 4, 2009 18:41
Show Gist options
  • Save jgornick/226283 to your computer and use it in GitHub Desktop.
Save jgornick/226283 to your computer and use it in GitHub Desktop.
JS: Get Now UTC Date
var now = new Date();
var offset = -now.getTimezoneOffset() * 60 * 1000;
var nowUTC = new Date(+now - offset);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment