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

188
Views
Extract timezone name from accept language header javascript

When I receive UTC date and the accept-language from a request, I want to convert that UTC date to timezone date (timezone should be relevant to the accept-language value).

If I can get timezone name from the locale, I can use formatInTimeZone function from date-fns-tz to convert UTC date.

So I want to extract time zone name ex:- "Africa/Cairo" from accept language header value ex: "ar-EG". I tried this

let arEG = new Intl.Locale("ar-EG");
console.log(arEG.timeZones); // logs ["Africa/Cairo"]

but it gives undefined.

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!