Skip to content

Instantly share code, notes, and snippets.

@BeauBouchard
Created July 25, 2013 00:39
Show Gist options
  • Save BeauBouchard/6075878 to your computer and use it in GitHub Desktop.
Save BeauBouchard/6075878 to your computer and use it in GitHub Desktop.
Date.prototype.changeTime= function(currentUTM, switchtoUTM){
this.setHours(this.getHours()+inc_value);
return this;
}
// My current location: EST - USA East coast is UTM -5 hours
// The Location I want to get the Time of is CET – Central European Time UTM +1 hours
var currentdate = new Date();
var currentDTString = "You're current time: " + currentdate.getDate() + "/"
+ (currentdate.getMonth()+1) + "/"
+ currentdate.getFullYear() + " @ "
+ currentdate.getHours() + ":"
+ currentdate.getMinutes() + ":"
+ currentdate.getSeconds();
alert(" " +datetime );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment