@Override
 protected Object readDateTime(BsonReader reader, DecoderContext ctx) {
   final JsonObject result = new JsonObject();
   result.put(
       DATE_FIELD,
       OffsetDateTime.ofInstant(Instant.ofEpochMilli(reader.readDateTime()), ZoneOffset.UTC)
           .format(ISO_OFFSET_DATE_TIME));
   return result;
 }
示例#2
0
  @Override
  public boolean isSatisfiedBy(Payment payment) {
    OffsetDateTime offsetPaymentDate;
    offsetPaymentDate = OffsetDateTime.ofInstant(payment.getDate(), ZoneOffset.UTC);

    logger.entry(payment);
    logger.entry(offsetPaymentDate);

    return logger.exit(offsetPaymentDate.toLocalTime().compareTo(value) <= 0);
  }