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

The date field is saving the incorrect date #3451

Closed
natasha-todi opened this issue Jan 27, 2021 · 3 comments · Fixed by #3698
Closed

The date field is saving the incorrect date #3451

natasha-todi opened this issue Jan 27, 2021 · 3 comments · Fixed by #3698

Comments

@natasha-todi
Copy link

Partner has reported that when they save dates, the calendar selects their chosen date but the saved date that appears is a completely different one.
Screenshot 1_calandar
Screenshot 2_result

@RafaPolit
Copy link
Member

Well, it's not really a "completely different one", it's the day before. This could be due to the timezone configuration on the client's machine. Can you please confirm that the client has the correct date and time and, most importantly, timezone configured in his computer?

Thanks.

@natasha-todi
Copy link
Author

natasha-todi commented Feb 1, 2021

@RafaPolit yes you're correct, it seems the date that the system is saving is just the day before. As suggested the partner has checked their timezone and has reported back that it is correctly set. Attaching further screenshots (from their public instance) sent by the partner with the comment that this issue is not happening on only one or two entities but on many entities as the date is entered.
Screenshot_20210201_134802
Screenshot_20210201_134903

@daneryl
Copy link
Collaborator

daneryl commented May 28, 2021

Our date-picker calculates the timestamp by adding a UTC offset using moment().utcOffset() this gives you the current offset, but in another dates the offset can be different, in this particular case for Korea timezone the offset between years 1948 - 1951 on summer (between may and September) was 1 hour more, this makes our date-picker to return the timestamp wrongly, in some cases being a different UTC date.

This is true for any timezone that changed at some point, but not on all cases we see this in the UI because the day does not change necessarily.

this is fixed in this PR #3698, but the timestamps already in the DB which are from this specific dates will be wrong.

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 a pull request may close this issue.

3 participants