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

121
Views
Convert Time to Another Timezone with Considering Daylight Time Using JavaScript

I'm trying to convert specific time to my local timezone that is Asia/Tehran with this code:

var date = new Date("9/9/2021 17:30 UTC +1").toLocaleString('en-US', {
        "timeZone": "Asia/Tehran"
})

Based on this link https://www.timeanddate.com/worldclock/converter.html?iso=20211009T163000&p1=3903&p2=246 I should get 20:00 time. But I'm getting 21:00. I know this is because of daylight times in Iran, But how can I consider daylight times when I want to use the JavaScript toLocaleString function?

about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

In the link, you have the month October, whereas in your code, you have September ๐Ÿ™‚.

about 4 years ago ยท Juan Pablo Isaza 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!