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

163
Views
Get timezone abbreviation from timezone name

How can we find time zone abbreviation from time zone name. Is there any library which we can use to get it.

e.g.:
Input- America/Los_Angeles
Output- PDT

I tried using

usertimezone = America/Los_Angeles
print(new Date().toLocaleTimeString('en-us',{timeZone: usertimezone, timeZoneName:'short'}).split(' ')[2]);

output- PDT

But we need to provide locale. For different marketplaces locale would be different. If locale is incorrect then it provides answer based on GMT+offset.

E.g. while using time zone as "Asia/Calcutta" output is GMT+5:30. But with locale 'en-in' output is IST

Is it possible to do with plain JavaScript or a framework or library?

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!