Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That date happens to be the date of DST transition in Brazil and Brazil is one of about 10 or so countries that transition at midnight rather than some later time such as 2am. Because of that, and due to how ES5's timezone logic works, the time winds up resetting backwards an hour, putting the Date object in the day before.

The other countries that do this are Chile, Paraguay, Cuba, Greenland, Iran, Lebanon, Syria, West Bank, and Gaza Strip. (I think I got them all..)



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: