Skip to content

Instantly share code, notes, and snippets.

@aalonzolu
Created May 3, 2017 00:39
Show Gist options
  • Save aalonzolu/4de97f17300af0df9eb97490dd855442 to your computer and use it in GitHub Desktop.
Save aalonzolu/4de97f17300af0df9eb97490dd855442 to your computer and use it in GitHub Desktop.
GT time javascript
var nowDateGT = function (){
Date.prototype.addHours = function(h) {
this.setTime(this.getTime() + (h*60*60*1000));
return this;}
now = new Date();
return now.addHours(-6);
}
console.log(nowDateGT())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment