From 013f5c3f3a4485e1fc08972a726beb09b3d16ca6 Mon Sep 17 00:00:00 2001 From: "Steinberg, Jan" Date: Thu, 15 Oct 2020 12:59:56 +0200 Subject: [PATCH] from date setting to log --- .../org/gesis/dda/wizard/service/BundlesSourceService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/gesis/dda/wizard/service/BundlesSourceService.java b/src/main/java/org/gesis/dda/wizard/service/BundlesSourceService.java index bad994ae..8af177c2 100755 --- a/src/main/java/org/gesis/dda/wizard/service/BundlesSourceService.java +++ b/src/main/java/org/gesis/dda/wizard/service/BundlesSourceService.java @@ -46,12 +46,17 @@ public class BundlesSourceService { KmhopbssDto updatedDto; if ( originalDto.isSecondGranularity() ) { + // next three lines for testing, can be removed afterwards + LocalDateTime ldt = LocalDateTime.ofInstant(nextIncrementalHarvestingStartInstant, ZoneOffset.UTC ); + LocalDate dayFrom = LocalDate.of( ldt.getYear(), ldt.getMonth(), ldt.getDayOfMonth() ); + log.info("Setting from date to: {}", dayFrom.toString()); updatedDto = new KmhopbssDto(oaiPmhEndpoint, nextIncrementalHarvestingStartInstant, null); } else { LocalDateTime ldt = LocalDateTime.ofInstant(nextIncrementalHarvestingStartInstant, ZoneOffset.UTC ); // convert from Instant to yyyy-MM-dd LocalDate dayFrom = LocalDate.of( ldt.getYear(), ldt.getMonth(), ldt.getDayOfMonth() ); + log.info("Setting dayFrom to: {}", dayFrom.toString()); updatedDto = new KmhopbssDto(oaiPmhEndpoint, dayFrom, null); } -- 2.17.2