Commit 013f5c3f authored by Steinberg, Jan's avatar Steinberg, Jan
Browse files

from date setting to log

parent 28bc3571
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
            }