You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have an issue with the timezones and I can't find the solution.
When the user picks his/her birthday's date the angular-moment-picker is automatically converting the date to UTC format. This is not too lucky since when I'm sending the picked date to the backend the UTC date will be sent so I don't know what was the local timezone of the client.
For example, if I'm in GMT and select my birthday: 1980-01-21 the backend will get 1980-01-20 as a date, and the wrong birthday will be stored (01-20 instead 01-21).
When the users want to see other user's birthday a wrong date appears when a user is in different timezone from GMT, only those users are getting the correct value (01-21) who are in the same timezone like me (GMT), users with a browser in UTC will get the wrong 01-20 birthday date.
I have no idea how to handle this on the backend side ( I don't want to convert back and forth the picked date object on the client side that would be a bit ugly).
Can I somehow avoid converting the picked value to UTC automatically? Or any other suggestions how should I handle this?
The text was updated successfully, but these errors were encountered:
Hi, I have an issue with the timezones and I can't find the solution.
When the user picks his/her birthday's date the angular-moment-picker is automatically converting the date to UTC format. This is not too lucky since when I'm sending the picked date to the backend the UTC date will be sent so I don't know what was the local timezone of the client.
For example, if I'm in GMT and select my birthday: 1980-01-21 the backend will get 1980-01-20 as a date, and the wrong birthday will be stored (01-20 instead 01-21).
When the users want to see other user's birthday a wrong date appears when a user is in different timezone from GMT, only those users are getting the correct value (01-21) who are in the same timezone like me (GMT), users with a browser in UTC will get the wrong 01-20 birthday date.
I have no idea how to handle this on the backend side ( I don't want to convert back and forth the picked date object on the client side that would be a bit ugly).
Can I somehow avoid converting the picked value to UTC automatically? Or any other suggestions how should I handle this?
The text was updated successfully, but these errors were encountered: