4 ms·
My servers in SF UTC-08:00 Some guy at UTC+02:00 set his event to 2pm on 2016-07-20 But I need to use moment.js to display the correct time with UTC. Is there
by kimshibal 10y ago
My servers in SF UTC-08:00
Some guy at UTC+02:00 set his event to 2pm on 2016-07-20
But I need to use moment.js to display the correct time with UTC. Is there a way to handle multi timezone users without external library?
- pinum 10y agoI'd personally just keep using Moment. The pain of working with JS Date objects isn't worth saving a few tens of KiB/a few ms of parsing time.
- jaredsohn 10y agoMy understanding is that Javascript Date objects only let you display dates in either the browser timezone or in UTC. If you want to display dates in another timezone you need to use a library that does that for you or write a function that adds/subtracts hours/minutes based on the offset. I'd recommend using a library.