I'm using moment.js to generate a date time string in NodeJS, but I don't know how to make it include (Coordinated Universal Time) at the end. Please help me. Thanks!
const moment = require('moment');
console.log(moment.utc().toString());
// result: Wed Mar 16 2022 11:07:40 GMT+0000
// not include (Coordinated Universal Time)
// Expected: Wed Mar 16 2022 11:07:40 GMT+0000 (Coordinated Universal Time)
Just add (Coordinated Universal Time) at the end of the string logged:
const moment = require('moment');
console.log(`${moment.utc().toString()} (Coordinated Universal Time)`);
// => Wed Mar 16 2022 11:07:40 GMT+0000 (Coordinated Universal Time)