/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | TimestampTest.java | 39 private Date now = new Date(); field in class:TimestampTest 53 new Timestamp(now, null); 59 Timestamp timestamp = new Timestamp(now, cpath); 60 assertEquals("not expected value", now, timestamp.getTimestamp()); 68 Timestamp one = new Timestamp(now, cpath); 69 Timestamp two = new Timestamp(now, cpath); 83 assertSame(new Timestamp(now, cpath).getSignerCertPath(), cpath); 87 Timestamp t = new Timestamp(now, cpath); 88 assertEquals(now, t.getTimestamp()); 89 assertNotSame(now, [all...] |
H A D | CodeSignerTest.java | 39 private Date now = new Date(); field in class:CodeSignerTest 41 private Timestamp ts = new Timestamp(now, cpath);
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
H A D | BasicFileAttributeViewCreationTimeTest.java | 71 Instant now = Instant.now(); 72 if (Math.abs(creationTime.toMillis()-now.toEpochMilli()) > 10000L) { 74 throw new RuntimeException("Expected to be close to: " + now); 101 Instant plusHour = Instant.now().plusSeconds(60L * 60L); 114 Instant minusHour = Instant.now().minusSeconds(60L * 60L);
|
H A D | FileTimeTest.java | 49 long now = System.currentTimeMillis(); 50 long tomorrowInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) + 1; 51 long yesterdayInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) - 1; 53 Instant nowInstant = Instant.ofEpochMilli(now); 56 eq(now, MILLISECONDS, now, MILLISECONDS); 57 eq(now, MILLISECONDS, now*1000L, MICROSECONDS); 58 neq(now, MILLISECONDS, 0, MILLISECONDS); 59 neq(now, MILLISECOND [all...] |
/libcore/ojluni/src/main/native/ |
H A D | PollArrayWrapper.c | 44 jlong start, now; local 57 now = t.tv_sec * 1000 + t.tv_usec / 1000; 58 diff = now - start; 63 start = now;
|
/libcore/luni/src/main/native/ |
H A D | libcore_icu_TimeZoneNames.cpp | 59 const UDate now(icu::Calendar::getNow()); 81 names->getDisplayName(lookup_id, UTZNM_LONG_STANDARD, now, long_std); 83 names->getDisplayName(lookup_id, UTZNM_SHORT_STANDARD, now, short_std); 85 names->getDisplayName(lookup_id, UTZNM_LONG_DAYLIGHT, now, long_dst); 87 names->getDisplayName(lookup_id, UTZNM_SHORT_DAYLIGHT, now, short_dst);
|
/libcore/luni/src/main/java/libcore/icu/ |
H A D | RelativeDateTimeFormatter.java | 67 * return a string describing 'time' as a time relative to 'now' such as 72 * the elapsed time between time' and 'now', e.g. minutes, days and etc. 87 * the abbreviated forms when available. When 'time' equals to 'now', it 92 long now, long minResolution, int flags) { 96 return getRelativeTimeSpanString(locale, tz, time, now, minResolution, flags, displayContext); 100 long now, long minResolution, int flags, DisplayContext displayContext) { 109 return getRelativeTimeSpanString(icuLocale, icuTimeZone, time, now, minResolution, flags, 114 android.icu.util.TimeZone icuTimeZone, long time, long now, long minResolution, int flags, 117 long duration = Math.abs(now - time); 118 boolean past = (now > 91 getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, long now, long minResolution, int flags) argument 99 getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, long now, long minResolution, int flags, DisplayContext displayContext) argument 113 getRelativeTimeSpanString(ULocale icuLocale, android.icu.util.TimeZone icuTimeZone, long time, long now, long minResolution, int flags, DisplayContext displayContext) argument 260 getRelativeDateTimeString(Locale locale, java.util.TimeZone tz, long time, long now, long minResolution, long transitionResolution, int flags) argument [all...] |
H A D | DateUtilsBridge.java | 183 Calendar now = (Calendar) c.clone(); 184 now.setTimeInMillis(System.currentTimeMillis()); 185 return c.get(Calendar.YEAR) == now.get(Calendar.YEAR);
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
H A D | RelativeDateTimeFormatterTest.java | 355 // (now + DAY_IN_MILLIS). 361 final long now = cal.getTimeInMillis(); 365 now - 42 * MINUTE_IN_MILLIS, now, MINUTE_IN_MILLIS, 0)); 368 now + 42 * MINUTE_IN_MILLIS, now, MINUTE_IN_MILLIS, 0)); 371 now - DAY_IN_MILLIS, now, DAY_IN_MILLIS, 0)); 374 now - 2 * DAY_IN_MILLIS, now, DAY_IN_MILLI [all...] |
/libcore/luni/src/test/java/libcore/java/time/format/ |
H A D | DateTimeFormatterBuilderTest.java | 56 formatter.format(ZonedDateTime.now(ZoneId.of("Europe/London")))); 58 formatter.format(ZonedDateTime.now(ZoneId.of("UTC")))); 67 formatter.format(OffsetDateTime.now(ZoneOffset.UTC));
|
/libcore/ojluni/src/main/java/java/time/ |
H A D | MonthDay.java | 159 public static MonthDay now() { method in class:MonthDay 160 return now(Clock.systemDefaultZone()); 175 public static MonthDay now(ZoneId zone) { method in class:MonthDay 176 return now(Clock.system(zone)); 189 public static MonthDay now(Clock clock) { method in class:MonthDay 190 final LocalDate now = LocalDate.now(clock); // called once 191 return MonthDay.of(now.getMonth(), now.getDayOfMonth());
|
H A D | YearMonth.java | 162 public static YearMonth now() { method in class:YearMonth 163 return now(Clock.systemDefaultZone()); 178 public static YearMonth now(ZoneId zone) { method in class:YearMonth 179 return now(Clock.system(zone)); 192 public static YearMonth now(Clock clock) { method in class:YearMonth 193 final LocalDate now = LocalDate.now(clock); // called once 194 return YearMonth.of(now.getYear(), now.getMonth());
|
H A D | OffsetTime.java | 159 public static OffsetTime now() { method in class:OffsetTime 160 return now(Clock.systemDefaultZone()); 176 public static OffsetTime now(ZoneId zone) { method in class:OffsetTime 177 return now(Clock.system(zone)); 192 public static OffsetTime now(Clock clock) { method in class:OffsetTime 194 final Instant now = clock.instant(); // called once 195 return ofInstant(now, clock.getZone().getRules().getOffset(now));
|
H A D | Year.java | 169 public static Year now() { method in class:Year 170 return now(Clock.systemDefaultZone()); 185 public static Year now(ZoneId zone) { method in class:Year 186 return now(Clock.system(zone)); 199 public static Year now(Clock clock) { method in class:Year 200 final LocalDate now = LocalDate.now(clock); // called once 201 return Year.of(now.getYear());
|
H A D | LocalTime.java | 237 public static LocalTime now() { method in class:LocalTime 238 return now(Clock.systemDefaultZone()); 253 public static LocalTime now(ZoneId zone) { method in class:LocalTime 254 return now(Clock.system(zone)); 267 public static LocalTime now(Clock clock) { method in class:LocalTime 270 final Instant now = clock.instant(); // called once 271 ZoneOffset offset = clock.getZone().getRules().getOffset(now); 272 long localSecond = now.getEpochSecond() + offset.getTotalSeconds(); // overflow caught later 274 return ofNanoOfDay(secsOfDay * NANOS_PER_SECOND + now.getNano());
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
H A D | HijrahChronologyTest.java | 58 HijrahDate date1 = HijrahDate.now(); 65 HijrahDate.now().withVariant(null);
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
H A D | CertificateValidity.java | 246 Date now = new Date(); 247 valid(now); 252 * @param now the Date against which to compare the validity 261 public void valid(Date now) argument 268 if (notBefore.after(now)) { 272 if (notAfter.before(now)) {
|
H A D | PrivateKeyUsageExtension.java | 195 Date now = new Date(); 196 valid(now); 208 public void valid(Date now) argument 210 Objects.requireNonNull(now); 216 if (notBefore != null && notBefore.after(now)) { 220 if (notAfter != null && notAfter.before(now)) {
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
H A 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/luni/src/test/java/libcore/java/util/ |
H A D | OldGregorianCalendarTest.java | 31 Date now = new Date(); 34 gc1.setTime(now); 36 gc2.setTime(now);
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
H A D | TestLocalTime.java | 185 // now() 189 public void now() { method in class:TestLocalTime 192 LocalTime.now(Clock.systemDefaultZone()); 196 LocalTime expected = LocalTime.now(Clock.systemDefaultZone()); 197 LocalTime test = LocalTime.now(); 205 // due to a DST change between the two calls to now. 208 "LocalTime.now vs LocalTime.now(Clock.systemDefaultZone()) not close");
|
/libcore/luni/src/test/java/libcore/java/time/ |
H A D | DurationTest.java | 83 { LocalDateTime.now(), MAX_DURATION }, 110 { LocalDateTime.now(), MAX_DURATION }, 132 Year.now(), 133 YearMonth.now(), 134 LocalDate.now(),
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | MinguoDate.java | 126 public static MinguoDate now() { method in class:MinguoDate 127 return now(Clock.systemDefaultZone()); 142 public static MinguoDate now(ZoneId zone) { method in class:MinguoDate 143 return now(Clock.system(zone)); 157 public static MinguoDate now(Clock clock) { method in class:MinguoDate 158 return new MinguoDate(LocalDate.now(clock));
|
H A D | ThaiBuddhistDate.java | 126 public static ThaiBuddhistDate now() { method in class:ThaiBuddhistDate 127 return now(Clock.systemDefaultZone()); 142 public static ThaiBuddhistDate now(ZoneId zone) { method in class:ThaiBuddhistDate 143 return now(Clock.system(zone)); 157 public static ThaiBuddhistDate now(Clock clock) { method in class:ThaiBuddhistDate 158 return new ThaiBuddhistDate(LocalDate.now(clock));
|
H A D | HijrahDate.java | 176 public static HijrahDate now() { method in class:HijrahDate 177 return now(Clock.systemDefaultZone()); 193 public static HijrahDate now(ZoneId zone) { method in class:HijrahDate 194 return now(Clock.system(zone)); 209 public static HijrahDate now(Clock clock) { method in class:HijrahDate 210 return HijrahDate.ofEpochDay(HijrahChronology.INSTANCE, LocalDate.now(clock).toEpochDay());
|