I am using moment for manipulate date in my application (NodeJs).
At this time, i have a client who send a date in the serveur like this
2018-04-17T12:47:12.123+01:00
and the serveur transform it to into start of day of timezone.
moment("2018-04-17T12:47:12.123+01:00").startOf('day').format();
Who return :
2018-04-17T00:00:00+02:00
And after it convert it into utc :moment.utc("2018-04-17T00:00:00+02:00").toISOString()
And give me : 2018-04-16T22:00:00.000Z
.
I want to know if it's a good practice to format always date on start of day ? I do this because i don't care about hours, i need only the day.
Thx