Skip to content
Snippets Groups Projects

fix: Fix Agreement return format + fixed date format issues

3 unresolved threads

Resolves #21 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
69 75
70 76 // Create document from user data + request info. Then encode it
71 77 String jsonDoc = objectMapper.writeValueAsString(DocumentBody.builder()
72 .setVersion(String.valueOf(docVersion))
78 .setVersion(String.valueOf(docVersion.intValue()))
  • 150 160
    151 161 List<Byte> docAsBytes = Arrays.asList(ArrayUtils.toObject(jsonDoc.getBytes()));
    152 162
    163 // Set date to UTC timezone when creating
    164 Date now = Date.from(ZonedDateTime.now().withZoneSameInstant(ZoneOffset.UTC).toInstant());
  • 189 private PublisherAgreementData buildPublisherAgreement(PeopleDocumentData document, boolean adjustTime) {
    190
    191 // Conversion of List<Byte> to byte[] to allow conversion to string
    192 byte[] blob = document.getScannedDocumentBLOB() == null ? new byte[0]
    193 : ArrayUtils.toPrimitive(
    194 document.getScannedDocumentBLOB().toArray(new Byte[document.getScannedDocumentBLOB().size()]));
    195
    196 SimpleDateFormat effectiveDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    197 SimpleDateFormat receivedDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    198
    199 String receivedDate = "";
    200
    201 // The 'received_date' column is only a 'date' type and gets rewinded a day when
    202 // adjusted for UTC time by fdndb-api. Flag should onlybe set on fetch requests
    203 if (adjustTime) {
    204 ZonedDateTime adjustedTime = ZonedDateTime
  • added 1 commit

    • 2d55d947 - fix: Use DateTimeHelper for date conversions

    Compare with previous version

  • Martin Lowe approved this merge request

    approved this merge request

  • mentioned in commit c7cdac5e

  • Please register or sign in to reply
    Loading