Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a moment with a timezone from another moment. #169

Merged
merged 3 commits into from
Jan 13, 2015

Conversation

timrwood
Copy link
Member

Currently, this is happening.

var a = moment.tz([2014, 9, 1], 'Europe/London');
var b = moment.tz(a, 'Europe/London');
console.log(a.format()); // 2014-10-01T00:00:00+01:00
console.log(b.format()); // 2014-09-30T23:00:00+01:00

Instead, this should happen.

var a = moment.tz([2014, 9, 1], 'Europe/London');
var b = moment.tz(a, 'Europe/London');
console.log(a.format()); // 2014-10-01T00:00:00+01:00
console.log(b.format()); // 2014-10-01T00:00:00+01:00

timrwood added a commit that referenced this pull request Jan 13, 2015
Creating a moment with a timezone from another moment.
@timrwood timrwood merged commit b96aceb into develop Jan 13, 2015
@timrwood timrwood deleted the cloned-moment-doesnt-need-offset branch January 13, 2015 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant