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

142
Views
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
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!