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
startOf('day') is giving me yesterday #3086
Comments
Because you are using the Based on your github profile, it appears you are in Israel. So, adjusting for the Asia/Jerusalem timezone and putting it all in code: //the time now in Jerusalem
moment().format()
"2016-04-03T14:48:10+03:00"
//start of day in Jersualem
moment().startOf('day').format()
"2016-04-03T00:00:00+03:00"
//start of day as ISO string is three hours before start of day in Jerusalem
moment().startOf('day').toISOString()
"2016-04-02T21:00:00.000Z" You either need to work completely in local time, and use This section of the docs might be helpful: |
:face-palm: Thank you for the thorough explanation. |
I think I've actually explained this one at least twice this week between here and Stack Overflow. You're not the only person to be confused. I'm going to update the docs to make the UTC part a bit more clear. |
The date widget in the advanced search was displaying a day earlier than the day it should have. Here is why: moment/moment#3086
The date widget in the advanced search was displaying a day earlier than the day it should have. Here is why: moment/moment#3086
The date widget in the advanced search was displaying a day earlier than the day it should have. Here is why: moment/moment#3086
Running the following code in Chrome Version 49.0.2623.110 m
Maybe related to #2982 ?
The text was updated successfully, but these errors were encountered: