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

158
Views
Javascript Date object return same hour for different timestamps

I have two separate timestamps: '2021-03-28T02:00:00' and '2021-03-28T03:00:00'

Both dates return the same JS timestamp: Sun Mar 28 2021 03:00:00 GMT+0200 (Central European Summer Time)

I believe this is because Central European Summer time starts 2021-03-28T02:00:00 but then I would expect 2021-03-28T03:00:00 to return 04:00:00 and not 03:00:00.

In short. I need the date '2021-03-28T02:00:00' to return: Sun Mar 28 2021 02:00:00 GMT+0200 (Central European Summer Time)

How come this is not what I am getting? why do I get the same timestamp from the two different dates?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

2021-03-28T02:00:00 cannot return what you want because such a time doesn't exist in practice. One second earlier, 2021-03-28T001:59:59 GMT+0100 exists, but as soon as the next second elapses the time becomes 03:00:00 GMT+0200.

You will have to modify your surrounding code in some other way, to remove the 'need' to display an impossible time.

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!