Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
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 Respuestas
Responde la pregunta

0

In the link, you have the month October, whereas in your code, you have September 🙂.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda