From 90c92b033028dc16d8a62eaf1fa086ddc3f785a4 Mon Sep 17 00:00:00 2001
From: "Stefan E. Funk" <funk@sub.uni-goettingen.de>
Date: Tue, 8 Jun 2021 15:19:17 +0200
Subject: [PATCH] Do not convert date twice

---
 .../main/java/info/textgrid/middleware/RecordDelivererDC.java | 4 +---
 .../java/info/textgrid/middleware/RecordListDelivererDC.java  | 4 +++-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java
index 4abf198a..a93bf2ca 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java
@@ -134,9 +134,7 @@ public class RecordDelivererDC extends RecordDelivererAbstract {
         }
         String setSpec =
             DublinCoreFieldLoader.fillList(esResultObject, DARIAHConstants.IDENTIFIER_LIST).get(0);
-        setRecordHeader(OAIPMHUtilities
-            .convertDateFormat(dateOfCreation).toString(), identifier, record, dublinCoreBuilder,
-            setSpec);
+        setRecordHeader(dateOfCreation, identifier, record, dublinCoreBuilder, setSpec);
       }
 
       if (this.textgrid == true
diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
index 9e181695..372cac7e 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java
@@ -220,9 +220,11 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract {
             log.debug(e);
           }
           
-          
+
+          // ES6
           JSONObject json = new JSONObject(hit.getSourceAsMap());
           this.modifiedValue = OAIPMHUtilities.fieldLoader(json, this.modifiedField);
+          // OLD
           //this.modifiedValue = hit.getSourceAsMap().get(this.modifiedField).toString();
 
           
-- 
GitLab