/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/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()
|
D | LocalTime.java | 237 public static LocalTime now() { in now() method in LocalTime 238 return now(Clock.systemDefaultZone()); in now() 253 public static LocalTime now(ZoneId zone) { in now() method in LocalTime 254 return now(Clock.system(zone)); in now() 267 public static LocalTime now(Clock clock) { in now() method in LocalTime 270 final Instant now = clock.instant(); // called once in now() local 271 ZoneOffset offset = clock.getZone().getRules().getOffset(now); in now() 272 … long localSecond = now.getEpochSecond() + offset.getTotalSeconds(); // overflow caught later in now() 274 return ofNanoOfDay(secsOfDay * NANOS_PER_SECOND + now.getNano()); in now()
|
D | OffsetDateTime.java | 205 public static OffsetDateTime now() { in now() method in OffsetDateTime 206 return now(Clock.systemDefaultZone()); in now() 222 public static OffsetDateTime now(ZoneId zone) { in now() method in OffsetDateTime 223 return now(Clock.system(zone)); in now() 238 public static OffsetDateTime now(Clock clock) { in now() method in OffsetDateTime 240 final Instant now = clock.instant(); // called once in now() local 241 return ofInstant(now, clock.getZone().getRules().getOffset(now)); in now()
|
D | LocalDateTime.java | 173 public static LocalDateTime now() { in now() method in LocalDateTime 174 return now(Clock.systemDefaultZone()); in now() 189 public static LocalDateTime now(ZoneId zone) { in now() method in LocalDateTime 190 return now(Clock.system(zone)); in now() 203 public static LocalDateTime now(Clock clock) { in now() method in LocalDateTime 205 final Instant now = clock.instant(); // called once in now() local 206 ZoneOffset offset = clock.getZone().getRules().getOffset(now); in now() 207 return ofEpochSecond(now.getEpochSecond(), now.getNano(), offset); 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/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()
|
D | HijrahDate.java | 176 public static HijrahDate now() { in now() method in HijrahDate 177 return now(Clock.systemDefaultZone()); in now() 193 public static HijrahDate now(ZoneId zone) { in now() method in HijrahDate 194 return now(Clock.system(zone)); in now() 209 public static HijrahDate now(Clock clock) { in now() method in HijrahDate 210 return HijrahDate.ofEpochDay(HijrahChronology.INSTANCE, LocalDate.now(clock).toEpochDay()); in now()
|
D | JapaneseDate.java | 159 public static JapaneseDate now() { in now() method in JapaneseDate 160 return now(Clock.systemDefaultZone()); in now() 175 public static JapaneseDate now(ZoneId zone) { in now() method in JapaneseDate 176 return now(Clock.system(zone)); in now() 190 public static JapaneseDate now(Clock clock) { in now() method in JapaneseDate 191 return new JapaneseDate(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/luni/src/test/java/libcore/java/time/chrono/ |
D | HijrahChronologyTest.java | 58 HijrahDate date1 = HijrahDate.now(); in test_HijrahDate_withVariant_same() 65 HijrahDate.now().withVariant(null); in test_HijrahDate_withVariant_null()
|
/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()
|