0

I need to display only the UTC Date and Time,

I am using this

moment.utc();

But it is considering my system time. I don't want to consider my system time. I just plainly want to print the UTC Time, How can i do that ?

SA__
  • 1,782
  • 3
  • 20
  • 41
  • Possible duplicate of [How do I get a UTC Timestamp in JavaScript?](https://stackoverflow.com/questions/9756120/how-do-i-get-a-utc-timestamp-in-javascript) – Avitus Feb 01 '18 at 16:56
  • Are you looking for `moment.utc().format()`? Use [`format()`](https://momentjs.com/docs/#/displaying/format/) to print the value of a moment object. – VincenzoC Feb 01 '18 at 17:09
  • Where is the code? How are you creating the moment.js object? – RobG Feb 01 '18 at 20:25
  • Have you considered `new Date().toISOString()`? – RobG Feb 02 '18 at 04:34

0 Answers0