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

191
Views
How can i get the timezone name from timestamp using moment.js?

I have this timestamp string July 29, 2022 02:23 AM EDT and I want to extract the EDT timezone name from it using moment.js. Is there any method provided by momentjs. I didn't find any option.

Can you help?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Maybe this way will work for you.

var dateString = 'July 29, 2022 02:23 AM EDT';
var dateObj = new Date(dateString);
var momentObj = moment(dateObj);
var momentString = momentObj.format('YYYY-MM-DD');
about 4 years ago · Santiago Trujillo Report

0

You can split it

const date = "July 29, 2022 02:23 AM EDT";
const dateSplited = date.split(' ');
console.log(dateSplited[dateSplited.length-1]);

or you can use getTimezoneOffset() from Date, it's almost the same.

or for momentjs zone.abbr(timestamp);, documentation here

about 4 years ago · Santiago Trujillo Report
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!