Request for patch review: tomorrow() and Daylight Saving Time

Hi there,

In 1.2.6, tomorrow has this effect around DST:,3,11).to_time.tomorrow

=> Mon Mar 12 00:00:00 -0700 2007

In 2.0.2 (and edge) it does this:,3,11).to_time.tomorrow

=> Sun Mar 11 23:00:00 -0700 2007

The fix is pretty simple: change tomorrow (and yesterday) to use
advance(:days => 1). I've attached the patch, which includes new
unit tests, to an older ticket I found on the same subject. Let me
know if it would be better to file a new one.


BTW, I created more unit tests to highlight a similar issue in

I'm going to attempt to fix, but I'm still trying to grok the new
Duration code.


Real fix attached to the ticket now. Reviews/comments would be much

The fix restores the previous behavior, though I do think that
behavior is a little strange/confusing. I'd expect that
t.since(86400) or t.since(24.hours) would always give me exactly 24
hours past the given time, even if that crosses DST boundary.
However, t.since( seems like it should give you the same time
the next day (which it does). Maybe not worth breaking backward
compatibility over.