--- old/src/java.base/share/classes/java/time/Instant.java 2015-10-08 12:05:22.491728000 +0300 +++ new/src/java.base/share/classes/java/time/Instant.java 2015-10-08 12:05:22.221728000 +0300 @@ -758,7 +758,7 @@ throw new UnsupportedTemporalTypeException("Unit must divide into a standard day without remainder"); } long nod = (seconds % LocalTime.SECONDS_PER_DAY) * LocalTime.NANOS_PER_SECOND + nanos; - long result = (nod / dur) * dur; + long result = Math.floorDiv(nod, dur) * dur ; return plusNanos(result - nod); } --- old/test/java/time/tck/java/time/TCKInstant.java 2015-10-08 12:05:23.089728000 +0300 +++ new/test/java/time/tck/java/time/TCKInstant.java 2015-10-08 12:05:22.836728000 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -638,6 +638,9 @@ {Instant.ofEpochSecond(86400 + 3600 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 0, 0)}, {Instant.ofEpochSecond(86400 + 7200 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 5400, 0)}, {Instant.ofEpochSecond(86400 + 10800 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 10800, 0)}, + + {Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_789), MINUTES, Instant.ofEpochSecond(-86400 - 3600 - 120, 0 )}, + {Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_789), MICROS, Instant.ofEpochSecond(-86400 - 3600 - 60 - 1, 123_456_000)}, }; } @Test(dataProvider="truncatedToValid")