On Fri, Apr 9, 2010 at 11:40 AM, Adam Vartanian <flo...@google.com> wrote: > There's no good way to do that directly. I'd just convert them to > DateTimes in UTC and subtract that way:
Adam, thanks for the input. I've tried something like this before, more exactly: new Duration(now.toDateTime(), limit.toDateTime()); But, sometimes I get the following exception: throw new IllegalArgumentException ("Illegal instant due to time zone offset transition: " + DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSS").print(new Instant(instant))); (from ZonedChronology @ line 143). I don't know what exactly this means, but if I use the code that you provide me, this problems its gone. If I convert the localdates to localdatetime in utc, this problems should dissapear? Thanks. Cheers. -- Mauro Ciancio <maurociancio at gmail dot com> ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest