diff options
author | Stephen Vance <steve@vance.com> | 2013-07-12 23:21:17 -0400 |
---|---|---|
committer | Stephen Vance <steve@vance.com> | 2013-07-12 23:21:17 -0400 |
commit | af26afca7226d43ecf711c3fc5a1763190018617 (patch) | |
tree | ae70c948a3d5c5a2ddabecf4721c58ddef5bc5e5 | |
parent | b23be92bd506eb4655d1d159fa34f12a29969ed2 (diff) | |
download | jQuery-Timepicker-Addon-af26afca7226d43ecf711c3fc5a1763190018617.zip jQuery-Timepicker-Addon-af26afca7226d43ecf711c3fc5a1763190018617.tar.gz jQuery-Timepicker-Addon-af26afca7226d43ecf711c3fc5a1763190018617.tar.bz2 |
Minor simplification of timepicker.timezoneAdjust(). Left the addition of the negation of date.getTimezoneOffset() to make it clear that we need to reverse its sense. Just representing it as straight subtraction might be mathematically simpler and marginally more performant, but would fail to suggest this important detail.
-rw-r--r-- | jquery-ui-timepicker-addon.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index ab02797..61d4d9b 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1966,7 +1966,7 @@ $.timepicker.timezoneAdjust = function(date, toTimezone) { var toTz = $.timepicker.timezoneOffsetNumber(toTimezone); if(!isNaN(toTz)){ - date.setMinutes(date.getMinutes()*1 + (date.getTimezoneOffset()*-1 - toTz*1) ); + date.setMinutes(date.getMinutes() + -date.getTimezoneOffset() - toTz); } return date; }; |