Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Can we work with moment in UTC mode? #174

Open
justinwyllie opened this issue May 6, 2016 · 2 comments
Open

Can we work with moment in UTC mode? #174

justinwyllie opened this issue May 6, 2016 · 2 comments

Comments

@justinwyllie
Copy link

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?

@foodaka
Copy link

foodaka commented Aug 23, 2016

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

@justinwyllie
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants