3 ms·
Brazil is another fun one that has caused my team's systems to blow up: since their DST transition occurs at midnight, there is no midnight on the DST transitio
by cle 12y ago
Brazil is another fun one that has caused my team's systems to blow up: since their DST transition occurs at midnight, there is no midnight on the DST transition day.
- apaprocki 12y agoBrazil is the most populous, which is why you've blown up there. They are actually one of a group of ten locales that transition at midnight. They have the dubious distinction of making the JS Date object revert back to the previous day if you create a Date with the transition day due to the constructor defaulting to midnight if not specified. (e.g. new Date(2013, 9, 19) in Brazil) The rest of the locales are much smaller and less likely to have customers you will break: Brazil, Chile, Paraguay, Cuba, Greenland, Iran, Lebanon, Syria, West Bank, Gaza Strip.