2

The reasons for deprecation in Java are explained here.

Doesn't the same reasoning apply for Javascript?

I understand the difference between Java and JavaScript.

Community
  • 1
  • 1
Peter K.
  • 7,720
  • 4
  • 45
  • 69

1 Answers1

1

Well, it does return minutes, not hours. So it can represent offsets correctly.

But its recently come to my attention that it is horribly broken, thanks to a bad decision in the ECMAScript 5.1 spec. See JavaScript Time Zone is wrong for past Daylight Saving Time transition rules

so I wouldn't rely on it anyway. No great solution yet, but watch this space. I will update this answer as I learn more.

Community
  • 1
  • 1
Matt Johnson-Pint
  • 197,368
  • 66
  • 382
  • 508