File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -341,12 +341,19 @@ public static int countMinutes(Calendar value){
341341 public static int countMinutes (int hour , int minute ){
342342 return hour * 60 + minute ;
343343 }
344-
345- public static LocalTime parseMinute (int minutes ){
346- int hours = (minutes / 60 ) % 24 ;
347- return LocalTime .of (hours , minutes % 60 );
344+
345+ public static LocalTime parseMinute (int minutes ) {
346+ int hours = minutes / 60 ;
347+ int remainingMinutes = minutes % 60 ;
348+
349+ if (minutes < 0 ) {
350+ hours = (hours - 1 + 24 ) % 24 ;
351+ remainingMinutes = 60 - Math .abs (remainingMinutes );
352+ }
353+
354+ return LocalTime .of (hours , remainingMinutes );
348355 }
349-
356+
350357 public static int murmur32 (final byte [] data , final int len , final int seed ) {
351358
352359 int h = len ;
You can’t perform that action at this time.
0 commit comments