Skip to content

Instantly share code, notes, and snippets.

@Alex-Just
Created April 19, 2018 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alex-Just/85626efaf1d989f749260dc8e71694bd to your computer and use it in GitHub Desktop.
Save Alex-Just/85626efaf1d989f749260dc8e71694bd to your computer and use it in GitHub Desktop.
var date = new Date();
undefined
date
Thu Apr 19 2018 17:52:34 GMT+0300 (MSK)
date.setHours(0);
1524088354412
date.setMinutes(0);
1524085234412
date.setSeconds(0);
1524085200412
date
Thu Apr 19 2018 00:00:00 GMT+0300 (MSK)
var date = new Date();
undefined
date.setUTCHours(0);
1524099196119
date.setUTCMinutes(0);
1524096016119
date.setUTCSeconds(0);
1524096000119
date
Thu Apr 19 2018 03:00:00 GMT+0300 (MSK)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment