react-bootstrap-datetimepicker icon indicating copy to clipboard operation
react-bootstrap-datetimepicker copied to clipboard

Can we work with moment in UTC mode?

Open justinwyllie opened this issue 8 years ago • 2 comments

E.g. when creating the moment I want to do this:

moment.utc('datetime string', 'format string', true) not moment.('datetime string', 'format string', true)

As per the moment docs:

By default, moment parses and displays in local time.

If you want to parse or display a moment in UTC, you can use moment.utc() instead of moment().

This brings us to an interesting feature of Moment.js. UTC mode.

Could this be added as a prop - to use moment in UTC mode?

justinwyllie avatar May 06 '16 16:05 justinwyllie

did you find a workaround for this? i also need this

foodaka avatar Aug 23 '16 03:08 foodaka

basically no. the date was displayed to the users in local time. we converted it to UTC to send to our back-end.

justinwyllie avatar Aug 23 '16 16:08 justinwyllie