/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | TimestampTest.java | 39 private Date now = new Date(); field in TimestampTest 53 new Timestamp(now, null); in testTimestamp() 59 Timestamp timestamp = new Timestamp(now, cpath); in testTimestamp() 60 assertEquals("not expected value", now, timestamp.getTimestamp()); in testTimestamp() 68 Timestamp one = new Timestamp(now, cpath); in testEqualsObject() 69 Timestamp two = new Timestamp(now, cpath); in testEqualsObject() 83 assertSame(new Timestamp(now, cpath).getSignerCertPath(), cpath); in testGetSignerCertPath() 87 Timestamp t = new Timestamp(now, cpath); in testGetTimestamp() 88 assertEquals(now, t.getTimestamp()); in testGetTimestamp() 89 assertNotSame(now, t.getTimestamp()); in testGetTimestamp() [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 49 long now = System.currentTimeMillis(); in main() local 50 long tomorrowInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) + 1; in main() 51 long yesterdayInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) - 1; in main() 53 Instant nowInstant = Instant.ofEpochMilli(now); in main() 56 eq(now, MILLISECONDS, now, MILLISECONDS); in main() 57 eq(now, MILLISECONDS, now*1000L, MICROSECONDS); in main() 58 neq(now, MILLISECONDS, 0, MILLISECONDS); in main() 59 neq(now, MILLISECONDS, 0, MICROSECONDS); in main() 61 eq(nowInstant, now, MILLISECONDS); in main() 62 eq(nowInstant, now*1000L, MICROSECONDS); in main() [all …]
|
D | BasicFileAttributeViewCreationTimeTest.java | 71 Instant now = Instant.now(); in test() local 72 if (Math.abs(creationTime.toMillis()-now.toEpochMilli()) > 10000L) { in test() 74 throw new RuntimeException("Expected to be close to: " + now); in test() 101 Instant plusHour = Instant.now().plusSeconds(60L * 60L); in test() 114 Instant minusHour = Instant.now().minusSeconds(60L * 60L); in test()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | HijrahDateTest.java | 44 HijrahDate.now().minus(/* amount= */ null); in minus_null_throws_NPE() 54 HijrahDate.now().minus(Duration.ofDays(1)); in minus_Duration_throws_DateTimeException() 64 HijrahDate.now().minus(Period.ofDays(1)); in minus_Period_throws_DateTimeException() 74 HijrahDate now = HijrahDate.of(1442, 10, 14); in minus_hijrah_period() local 77 now.minus(HijrahChronology.INSTANCE.period(0, 0, 1))); in minus_hijrah_period() 79 now.minus(HijrahChronology.INSTANCE.period(1, 0, 0))); in minus_hijrah_period() 81 now.minus(HijrahChronology.INSTANCE.period(-1, -1, -1))); in minus_hijrah_period() 83 now.minus(HijrahChronology.INSTANCE.period(0, 0, 14))); in minus_hijrah_period() 85 now.minus(HijrahChronology.INSTANCE.period(0, 0, -16))); in minus_hijrah_period()
|
D | JapaneseDateTest.java | 43 JapaneseDate.now().minus(null); in minus_null_throwsNpe() 74 JapaneseDate.now().minus(1, ChronoUnit.HOURS); in minus_less_than_day_throwsUnsupportedTemporalTypeException() 81 JapaneseDate.now().minus(1, ChronoUnit.MINUTES); in minus_less_than_day_throwsUnsupportedTemporalTypeException() 88 JapaneseDate.now().minus(1, ChronoUnit.SECONDS); in minus_less_than_day_throwsUnsupportedTemporalTypeException() 98 JapaneseDate.now().minus(Duration.ofDays(1)); in minus_Duration_throws_UnsupportedTemporalTypeException() 108 JapaneseDate.now().minus(Period.ofDays(1)); in minus_Period_throws_DateTimeException()
|
D | ChronoPeriodTest.java | 47 ChronoPeriod.between(null, LocalDate.now()); in between_withNull_throwsNpe() 54 ChronoPeriod.between(LocalDate.now(), null); in between_withNull_throwsNpe() 63 LocalDate now = LocalDate.of(2021, 5, 26); in between_nonNull() local 66 assertEquals(Period.ofDays(1), ChronoPeriod.between(now, tomorrow)); in between_nonNull()
|
D | MinguoDateTest.java | 40 MinguoDate.now().minus(null); in minus_null_throwsNpe() 57 MinguoDate.now().minus(Duration.ofDays(1)); in minus_Duration_throws_UnsupportedTemporalTypeException() 67 MinguoDate.now().minus(Period.ofDays(1)); in minus_Period_throws_DateTimeException()
|
D | HijrahChronologyTest.java | 59 HijrahDate date1 = HijrahDate.now(); in test_HijrahDate_withVariant_same() 66 HijrahDate.now().withVariant(null); in test_HijrahDate_withVariant_null()
|
/libcore/ojluni/src/main/native/ |
D | PollArrayWrapper.c | 44 jlong start, now; in ipoll() local 57 now = t.tv_sec * 1000 + t.tv_usec / 1000; in ipoll() 58 diff = now - start; in ipoll() 63 start = now; in ipoll()
|
/libcore/ojluni/src/main/java/java/time/ |
D | MonthDay.java | 159 public static MonthDay now() { in now() method in MonthDay 160 return now(Clock.systemDefaultZone()); in now() 175 public static MonthDay now(ZoneId zone) { in now() method in MonthDay 176 return now(Clock.system(zone)); in now() 189 public static MonthDay now(Clock clock) { in now() method in MonthDay 190 final LocalDate now = LocalDate.now(clock); // called once in now() local 191 return MonthDay.of(now.getMonth(), now.getDayOfMonth()); in now()
|
D | Year.java | 169 public static Year now() { in now() method in Year 170 return now(Clock.systemDefaultZone()); in now() 185 public static Year now(ZoneId zone) { in now() method in Year 186 return now(Clock.system(zone)); in now() 199 public static Year now(Clock clock) { in now() method in Year 200 final LocalDate now = LocalDate.now(clock); // called once in now() local 201 return Year.of(now.getYear()); in now()
|
D | YearMonth.java | 162 public static YearMonth now() { in now() method in YearMonth 163 return now(Clock.systemDefaultZone()); in now() 178 public static YearMonth now(ZoneId zone) { in now() method in YearMonth 179 return now(Clock.system(zone)); in now() 192 public static YearMonth now(Clock clock) { in now() method in YearMonth 193 final LocalDate now = LocalDate.now(clock); // called once in now() local 194 return YearMonth.of(now.getYear(), now.getMonth()); in now()
|
D | OffsetTime.java | 159 public static OffsetTime now() { in now() method in OffsetTime 160 return now(Clock.systemDefaultZone()); in now() 176 public static OffsetTime now(ZoneId zone) { in now() method in OffsetTime 177 return now(Clock.system(zone)); in now() 192 public static OffsetTime now(Clock clock) { in now() method in OffsetTime 194 final Instant now = clock.instant(); // called once in now() local 195 return ofInstant(now, clock.getZone().getRules().getOffset(now)); in now()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestChronoLocalDate.java | 146 date = ThaiBuddhistDate.now(); 186 LocalDateTime now = LocalDateTime.now(); 188 ChronoLocalDateTime<?> ldt = chrono.localDateTime(now); 193 LocalDateTime now = LocalDateTime.now(); 195 ChronoLocalDateTime<? extends ChronoLocalDate> ldt = chrono.localDateTime(now);
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | PrivateKeyUsageExtension.java | 195 Date now = new Date(); in valid() local 196 valid(now); in valid() 208 public void valid(Date now) in valid() argument 210 Objects.requireNonNull(now); in valid() 216 if (notBefore != null && notBefore.after(now)) { in valid() 220 if (notAfter != null && notAfter.before(now)) { in valid()
|
D | CertificateValidity.java | 246 Date now = new Date(); in valid() local 247 valid(now); in valid() 261 public void valid(Date now) in valid() argument 268 if (notBefore.after(now)) { in valid() 272 if (notAfter.before(now)) { in valid()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | DurationTest.java | 83 { LocalDateTime.now(), MAX_DURATION }, in test_addTo_exceeds() 110 { LocalDateTime.now(), MAX_DURATION }, in test_subtractFrom_exceeds() 132 Year.now(), in test_addTo_subtractFrom_unsupported() 133 YearMonth.now(), in test_addTo_subtractFrom_unsupported() 134 LocalDate.now(), in test_addTo_subtractFrom_unsupported()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalTime.java | 189 public void now() { in now() method in TestLocalTime 192 LocalTime.now(Clock.systemDefaultZone()); in now() 196 LocalTime expected = LocalTime.now(Clock.systemDefaultZone()); in now() 197 LocalTime test = LocalTime.now(); in now()
|
/libcore/luni/src/test/java/libcore/java/time/format/ |
D | DateTimeFormatterBuilderTest.java | 56 formatter.format(ZonedDateTime.now(ZoneId.of("Europe/London")))); in test_appendZoneRegionId_format() 58 formatter.format(ZonedDateTime.now(ZoneId.of("UTC")))); in test_appendZoneRegionId_format() 67 formatter.format(OffsetDateTime.now(ZoneOffset.UTC)); in test_appendZoneRegionId_format_offset()
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | TestUtils.java | 44 Duration now = Duration.ofNanos(System.nanoTime()); in waitWhileTrueOrTimeout() local 45 if (now.minus(startTime).compareTo(timeout) >= 0) { in waitWhileTrueOrTimeout()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | MinguoDate.java | 126 public static MinguoDate now() { in now() method in MinguoDate 127 return now(Clock.systemDefaultZone()); in now() 142 public static MinguoDate now(ZoneId zone) { in now() method in MinguoDate 143 return now(Clock.system(zone)); in now() 157 public static MinguoDate now(Clock clock) { in now() method in MinguoDate 158 return new MinguoDate(LocalDate.now(clock)); in now()
|
D | ThaiBuddhistDate.java | 126 public static ThaiBuddhistDate now() { in now() method in ThaiBuddhistDate 127 return now(Clock.systemDefaultZone()); in now() 142 public static ThaiBuddhistDate now(ZoneId zone) { in now() method in ThaiBuddhistDate 143 return now(Clock.system(zone)); in now() 157 public static ThaiBuddhistDate now(Clock clock) { in now() method in ThaiBuddhistDate 158 return new ThaiBuddhistDate(LocalDate.now(clock)); in now()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldGregorianCalendarTest.java | 31 Date now = new Date(); in testGetHour() local 34 gc1.setTime(now); in testGetHour() 36 gc2.setTime(now); in testGetHour()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKMonthDay.java | 153 public void now() { in now() method in TCKMonthDay 154 MonthDay expected = MonthDay.now(Clock.systemDefaultZone()); in now() 155 MonthDay test = MonthDay.now(); in now() 160 expected = MonthDay.now(Clock.systemDefaultZone()); in now() 161 test = MonthDay.now(); in now() 171 MonthDay.now((ZoneId) null); in now_ZoneId_nullZoneId() 177 MonthDay expected = MonthDay.now(Clock.system(zone)); in now_ZoneId() 178 MonthDay test = MonthDay.now(zone); in now_ZoneId() 183 expected = MonthDay.now(Clock.system(zone)); in now_ZoneId() 184 test = MonthDay.now(zone); in now_ZoneId() [all …]
|
/libcore/luni/src/main/java/libcore/icu/ |
D | DateUtilsBridge.java | 183 Calendar now = (Calendar) c.clone(); in isThisYear() local 184 now.setTimeInMillis(System.currentTimeMillis()); in isThisYear() 185 return c.get(Calendar.YEAR) == now.get(Calendar.YEAR); in isThisYear()
|