spencermountain / spacetime

A lightweight javascript timezone library
http://spacetime.how/
Other
3.99k stars 183 forks source link

support 17-minute dst change in 1895 #214

Open spencermountain opened 4 years ago

spencermountain commented 4 years ago
let d = spacetime('june 2nd 1892')
d.every('year', 'june 2nd 1902').forEach((y) => {
  console.log(y.format('iso-short'))
})
/*
1893-01-01
1894-01-01
1894-12-31 //day shy
1896-12-31
1898-12-31
1900-12-31
1894-12-31
*/
spencermountain commented 4 years ago

this appears to be sensitive to current minute

let d = spacetime('1895-01-01') //.startOf('day')
d = d.minute(0)
console.log(d.format('')) //1894-12-31
spencermountain commented 4 years ago

closer to the issue:

let d = spacetime('1895-01-01').startOf('day')
console.log(d.format('nice-full')) 
//January 1st, 12:26am
spencermountain commented 4 years ago

found a 17-minute DST change. I think it may be the first DST change in the Americas. image https://www.timeanddate.com/time/change/canada/toronto?year=1895