We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I use setDefault to a specific timezone, startOf is not assuming that timezone and is using local timezone instead.
setDefault
startOf
var localActual = moment([2016, 1, 1, 16, 0, 0]).unix(); var localStart = moment([2016, 1, 1, 16, 0, 0]).startOf('day').unix(); moment.tz.setDefault('America/Los_Angeles'); var mockedActual = moment([2016, 1, 1, 16, 0, 0]).unix(); var mockedStart = moment([2016, 1, 1, 16, 0, 0]).startOf('day').unix(); console.log(localActual === mockedActual); // false console.log(localStart === mockedStart); // true
I already created an example in my codepen, here.
The text was updated successfully, but these errors were encountered:
Dup #208
Thanks.
Sorry, something went wrong.
No branches or pull requests
When I use
setDefault
to a specific timezone,startOf
is not assuming that timezone and is using local timezone instead.I already created an example in my codepen, here.
The text was updated successfully, but these errors were encountered: