Open rajithwijepura opened 6 years ago
Yes, to set "literally" a timezone, you need the "tz" method (additional) from moment,js. Documentation: https://momentjs.com/timezone/docs/
I have the same problem right now. The users can pick their birthday. The user picks the date, the model value will be set the selected date with time (00:00:00) and timezone so when I send it to my database the day will be one less than hat I've sent. I'm in GMT the server is in UTC, so that's why. I can fix this by handling the date as a string instead of a date object so the timezone won't be changed, but this shouldn't be the right way to store the sent data. I would like to overwrite that, the default timezone is the client's timezone, I would like to force a static timezone instead. How can I do that through angularjs?
Thank you
Hi, is there a way to set timezone for the momentDate? I'm in GMT+5.30.
Thanks