My customer's store is in GMT +5:30
timezone but the user's locale is in GMT +8
timezone.
Currently, I'm using javascript's .toISOString()
function to convert to UTC and storing UTC in the database. I retrieve UTC from the database and send exactly that the browser, so the new Date('2019-11-15T00:00:00Z')
function converts the UTC to the browser's locale.
But, if the user opens a record created by GMT +8
timezone user or vice-versa, the dates are getting messed up.
I'm thinking it would be good if I can transfer the exact date the user enters in the browser and send that exact date to the backend to easily offset using the store's timezone?
The frontend is in VueJs
and the backend is in C#
.