1

I've tried the following two options:

        DateTime dt = new DateTime();
        dt = dt.plusDays(1).withMinuteOfHour(0);

and

        DateTime dt = new DateTime();
        dt = dt.withMinuteOfHour(0);

they both report the following error message:

Method "withMinuteOfHour" with signature "(I)Lorg/joda/time/DateTime;" is not applicable on this object

I'm using joda time 2.3:

joda-time:joda-time:2.3
blueberryfields
  • 45,910
  • 28
  • 89
  • 168

2 Answers2

2

You can also do this

DateTime dt = new DateTime();
dt = dt.minusMinutes(dt.minuteOfHour()).minusSecond(dt.secondOfMinute());
StackFlowed
  • 6,664
  • 1
  • 29
  • 45
1

Tracked this to a version conflict between the joda time version included with weblogic, and the one that my application wants to use.

See the answer to this question for ideas for a workaround - solutions #2/#3 in the accepted answer are probably the correct ones to use (and worked for me in this situation).

Community
  • 1
  • 1
blueberryfields
  • 45,910
  • 28
  • 89
  • 168