Permalink
Browse files

Fix UTC Offset

#getTimezoneOffset() returns seconds TO ADD TO GET TO UTC not the
offset as seen with #toString()
  • Loading branch information...
1 parent b70f73e commit e1633717296a483221740f649f7ed12eb018496d @kensnyder committed Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Date.js
View
@@ -327,7 +327,7 @@
* @return {Date}
*/
setUTCOffset: function(seconds) {
- var curr = this.getTimezoneOffset();
+ var curr = this.getTimezoneOffset() * -1;
var utcNow = this.getTime() + (curr * 60000);
this.setTime(utcNow - (seconds * 60000));
return this;

0 comments on commit e163371

Please sign in to comment.