I am using MomentJS in my angular project and i\'m having a lot of issues with different date timezones.
My app should not take into consideration any timezones, how
you can try to use moment in UTC mode in this way:
let m = moment().utc()
then, to reset the time to midnight of that day you can call this method:
m.startOf('day')
you can also chain it all together:
let m = moment.utc().startOf('day')
and if you print it it will be something like:
console.log(m.format())
// 2019-07-02T00:00:00Z
You can also do it with the native Date, but you'll have to write a bunch of code that momentjs already has...
I hope this answer your questions!
for reference have a look here: https://momentjs.com/docs/#/parsing/utc/
and here: https://momentjs.com/docs/#/manipulating/start-of/