On Thu, Mar 12, 2009 at 02:28:34PM -0500, Dave Rolsky wrote: > On Thu, 12 Mar 2009, Bill Moseley wrote: > >> Is there a canonical approach, or is it something like: >> >> $dt->add( days => 1 )->truncate( to => 'day' )->subtract( seconds => 1 ); > > That should work fine, _but_ if you're not in the floating timezone that > could land you on "second 60" every once in a while, and your dbms may > not like it.
Interesting. It's a valid time, though, correct? > If the unit of interval is days, I'd suggest simply defining an internval > as "from X (inclusive) to Y (non-inclusive)". That way both X and Y can > be plain old dates. That's probably a safer approach. -- Bill Moseley. mose...@hank.org Sent from my iMutt