149
rated 0 times
[
155]
[
6]
/ answers: 1 / hits: 18575
/ 6 Years ago, wed, may 30, 2018, 12:00:00
Trying to understand the behaviour and difference between:
moment.utc(date) and moment(date).utc()
Using '2018-05-31' as a param:
moment.utc('2018-05-31').format()
will give:
2018-05-31T00:00:00Z
while moment('2018-05-31').utc().format()
will give:
2018-05-31T04:00:00Z
I am executing both in EST timezone.
More From » momentjs