I am using moment js to get only the UTC time.
const time = moment().utc().format('HH:mm:ss');
example output is like this - "07:57:49"
I want to change this time value to relevant timezone value.
const americaTime = moment(time).tz("America/Los_Angeles").format();
But there is an warning saying - "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Is there any alternative way to overcome this issue ?