Skip to content

Commit

Permalink
Use zone(z, false) to set the zone without adjusting time
Browse files Browse the repository at this point in the history
This is related to moment#1468
  • Loading branch information
ichernev committed Feb 6, 2014
1 parent e8537bd commit 53d0ee4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions moment-timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,15 +451,10 @@
var offset;
if (mom._z) {
offset = mom._z.offset(mom);
if (dontAdjustTime) {
mom._offset = offset;
mom._isUTC = true;
} else {
if (Math.abs(offset) < 16) {
offset = offset / 60;
}
mom.zone(offset);
if (Math.abs(offset) < 16) {
offset = offset / 60;
}
mom.zone(offset, !dontAdjustTime);
}
};

Expand Down

0 comments on commit 53d0ee4

Please sign in to comment.