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

149
Vistas
New Date() and New Date(string) not using the same timezone

In JavaScript, why does those two lines of code use different time zone?

new Date("09/12/2021 15:00:03 UTC")

Returns Sun Sep 12 2021 11:00:03 GMT-0400 (Eastern Daylight Time)

new Date()

Returns Sun Sep 12 2021 10:00:03 GMT-0500 (Eastern Standard Time)

Why are they not both on GMT-0500 (Eastern Standard Time)???

The lines are one after the other in code, so they are run by the same server.

Thanks.

-- EDIT --

I tried with ISO format and the timezone is still wrong.

new Date("2021-09-12T16:34:14.000Z")

And the output is Sun Sep 12 2021 12:34:14 GMT-0400 (Eastern Daylight Time)

about 4 years ago · Juan Pablo Isaza
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