Skip to content

Commit

Permalink
Merge pull request #61 from ichernev/use-zone-skip-adjust
Browse files Browse the repository at this point in the history
Use zone(z, false) to set the zone without adjusting time
  • Loading branch information
icambron committed Feb 6, 2014
2 parents e8537bd + 53d0ee4 commit 9ac9c47
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 9ac9c47

Please sign in to comment.