PDP-10 / its

Incompatible Timesharing System
Other
857 stars 81 forks source link

Updated daylight savings time calculations for the US to reflect current rules #2291

Closed eswenson1 closed 5 months ago

eswenson1 commented 6 months ago

In 2017, the rules changed from a start date of the 1st Sunday in April to the 2nd Sunday in March. The end date changed from the last Sunday in October to the 1st Sunday in November.

eswenson1 commented 6 months ago

@bictorv and @larsbrinkhoff (and anyone else) please review the changes for correctness. I think these are correct, but I'm having a hard time wrapping my head around the increment 6, rather than the increment 7, as reflecting the "second Sunday". I think it is correct as is, but I'd appreciate another set of eyes.

Needless to say, that booting ITS with this change does the correct thing now (considers the time zone to be daylight time rather than standard time), but the devil is in the boundary conditions!

larsbrinkhoff commented 6 months ago

I can't say I understand this very well. E.g. why write <6+7> instead of plainly <13>? Probably @bictorv is the one to review this.

eswenson1 commented 6 months ago

I followed Björn’s convention. 6 days past the start date. Written as n+6. Or n+6.

bictorv commented 6 months ago

Sometimes I think it would be good to not only test for DSTEU, but also what year we're dealing with, since rules change. We might get a change in EU soon:ish, and then it would be nice to have the code in place, triggering the right case the right year. But we can hope to remember to do this in time for the change. ;-)