> Perhaps the key thing to note is that 1772-05-19 is about 236 years > and 7 months ago, which (get your calculators out) is about 86400, ie > the number of seconds in a day. Whereas on an instance of Time, +/- 1 > means +/- 1 second, on instances of Date/DateTime +/- means +/- 1 > second. That is I suspect the basic problem.
Man, good call. > On newer versions of rails, things like 1.day are smart enough to do > the right thing whether or not you add a date or a Time to them (the + > method on Date is overriden to check if the argument is a thing like > 1.day). I'm using 2.2.2, but... > Somewhere this has gone wrong. If you have any plugins that mess with > dates (or if you've being doing stuff like that yourself) then I'd > have a look at those - it could be something like once some random > model is loaded some extensions to Date are pulled in at that point > and from then onwards calculations are borked. ... I do monkeypatch Date, but I ensured that I wasn't actually overriding any existing method. Thanks for you help Fred, this smells like the right track. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---