Skip to content

Instantly share code, notes, and snippets.

@stevenwoodson
Last active August 29, 2015 14:06
Show Gist options
  • Save stevenwoodson/95dc4dc10e0c73d32408 to your computer and use it in GitHub Desktop.
Save stevenwoodson/95dc4dc10e0c73d32408 to your computer and use it in GitHub Desktop.
Javascript Timestamp - GMT & Specified Timezone Examples
// Make sure to use the decimal fraction of a second in the examples below
// Came across issues in Safari when they weren't used, see http://www.w3.org/TR/NOTE-datetime for more info
// September 10th 2014, 5pm GMT
new Date('2014-09-10T17:00:00.000').getTime()
// September 10th 2014, 5pm ET
new Date('2014-09-10T17:00:00.000-04:00').getTime()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment