Comparing instances of java.time.ZonedDateTime ignoring seconds and milliseconds instants from comparisons in Java 8
<p>I am looking for an equivalent way of Joda Time in Java 8 comparing instances of <code>org.joda.time.DateTime</code> (with a time zone specified) ignoring seconds and milliseconds from comparisons as follows.</p>

<pre><code>DateTimeFormatter formatter = DateTimeFormat.forPattern("dd-MMM-yyyy hh:mm:ss:SSS a Z").withZone(DateTimeZone.forID("Asia/Kolkata"));
DateTime first = formatter.parseDateTime("16-Feb-2012 12:03:45:999 AM +05:30");
DateTime second = formatter.parseDateTime("16-Feb-2012 12:03:55:999 AM +05:30");

DateTimeComparator comparator = DateTimeComparator.getInstance(DateTimeFieldType.minuteOfHour());
int compare = comparator.compare(first, second);
System.out.println("compare : " + compare);
</code></pre>

<p>The comparison returns <code>0</code> meaning that both the objects have been considered equal after ignoring seconds and milliseconds instants from the comparison.</p>

<p>Fields of a magnitude less than the lower limit specified with <code>DateTimeFieldType</code> are ignored here.</p>

<p>What is the equivalent way of doing the same thing using the Java Time API in Java 8?</p>

<p><sub>To be honest, I did not succeed to achieve the same in Java 8 with my attempts.</sub></p>