Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
Using Moment.tz to convert to timezone

I have the following code

const timeInTz = moment.tz('2022-01-01 21:00', 'America/New_York').utc().format('HH:mm');
alert(timeInTz);

I'm trying to convert from eastern time to utc and then only get the time in the output date, but the result is not a UTC date but actually eastern time. The code is not converting the date from one timezone to another. Can someone please help?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!