Searched refs:withNano (Results 1 - 13 of 13) sorted by relevance

/libcore/ojluni/src/test/java/time/tck/java/time/
H A DTCKClock_Tick.java88 Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000_000).toInstant(), PARIS), Duration.ofMillis(250));
89 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000_000).toInstant());
96 Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i * 1000).toInstant(), PARIS), Duration.ofNanos(250_000));
97 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000).toInstant());
104 Clock test = Clock.tick(Clock.fixed(ZDT.withNano(i).toInstant(), PARIS), Duration.ofNanos(20));
105 assertEquals(test.instant(), ZDT.withNano((i / 20) * 20).toInstant());
H A DTCKLocalTime.java1231 // withNano()
1236 t = t.withNano(1);
1238 t = t.withNano(10);
1240 t = t.withNano(100);
1242 t = t.withNano(999999999);
1248 LocalTime t = TEST_12_30_40_987654321.withNano(987654321);
1254 LocalTime t = LocalTime.of(0, 0, 0, 1).withNano(0);
1260 LocalTime t = LocalTime.of(12, 0, 0, 1).withNano(0);
1266 TEST_12_30_40_987654321.withNano(-1);
1271 TEST_12_30_40_987654321.withNano(100000000
[all...]
H A DTCKLocalDateTime.java1336 // withNano()
1341 t = t.withNano(1);
1343 t = t.withNano(10);
1345 t = t.withNano(100);
1347 t = t.withNano(999999999);
1353 TEST_2007_07_15_12_30_40_987654321.withNano(-1);
1358 TEST_2007_07_15_12_30_40_987654321.withNano(1000000000);
1367 assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(SECONDS), TEST_2007_07_15_12_30_40_987654321.withNano(0));
H A DTCKOffsetTime.java852 // withNano()
857 OffsetTime test = base.withNano(15);
864 OffsetTime test = base.withNano(1);
874 assertEquals(TEST_11_30_59_500_PONE.truncatedTo(SECONDS), TEST_11_30_59_500_PONE.withNano(0));
H A DTCKZonedDateTime.java1546 // withNano()
1551 ZonedDateTime test = base.withNano(15);
1552 assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withNano(15), ZONE_0100));
1558 ZonedDateTime test = base.withNano(500);
1568 assertEquals(TEST_DATE_TIME.truncatedTo(SECONDS), TEST_DATE_TIME.withNano(0));
H A DTCKOffsetDateTime.java897 // withNano()
902 OffsetDateTime test = base.withNano(15);
912 assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(SECONDS), TEST_2008_6_30_11_30_59_000000500.withNano(0));
/libcore/ojluni/src/main/java/java/time/
H A DLocalTime.java832 case NANO_OF_SECOND: return withNano((int) newValue);
834 case MICRO_OF_SECOND: return withNano((int) newValue * 1000);
836 case MILLI_OF_SECOND: return withNano((int) newValue * 1000_000);
914 public LocalTime withNano(int nanoOfSecond) { method in class:LocalTime
H A DOffsetTime.java789 public OffsetTime withNano(int nanoOfSecond) { method in class:OffsetTime
790 return with(time.withNano(nanoOfSecond), offset);
H A DOffsetDateTime.java1099 public OffsetDateTime withNano(int nanoOfSecond) { method in class:OffsetDateTime
1100 return with(dateTime.withNano(nanoOfSecond), offset);
H A DLocalDateTime.java1088 public LocalDateTime withNano(int nanoOfSecond) { method in class:LocalDateTime
1089 LocalTime newTime = time.withNano(nanoOfSecond);
H A DZonedDateTime.java1472 * {@linkplain LocalDateTime#withNano(int) changing the time} of the local date-time.
1486 public ZonedDateTime withNano(int nanoOfSecond) { method in class:ZonedDateTime
1487 return resolveLocal(dateTime.withNano(nanoOfSecond));
/libcore/ojluni/src/test/java/time/test/java/time/
H A DTestLocalDateTime.java206 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withNano(987654321);
212 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).withNano(0);
218 LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).withNano(0);
H A DTestOffsetDateTime.java196 OffsetDateTime test = base.withNano(1);

Completed in 223 milliseconds