On Sep 8, 2:26 pm, Tom Lea <[EMAIL PROTECTED]> wrote: > Do you have a test case that fails?
Actually, you're right -- it doesn't fail with Time.local instances. But it does fail with TimeWithZone instances, as of of this commit: http://github.com/rails/rails/commit/676d6a651497b56f31e00db4e7795669de0da672 . There's an open ticket on Lighthouse to add this same behavior to Time.local instances: http://rails.lighthouseapp.com/projects/8994/tickets/504-rails-2-1-dst-issues But this isn't directly relevant to you patch, other than, when this Time.local bug (a holdover from pre-Duration days) is fixed, Time.local(2008, 11, 2) + 1.5.hours + 1.5.hours will (correctly) no longer be equal to Time.local(2008, 11, 2) + 3.hours. I think Koz is right, better to have this somewhat counter-intuitive edge case than the current behavior of ignoring the fractional part of :days and :weeks entirely. Given that we're fixing :days and :weeks options, would it make sense to fix :months and :years args as well? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
