Skip to content

Commit

Permalink
FolioRemoteServiceManager - date format
Browse files Browse the repository at this point in the history
  • Loading branch information
mis306lu authored Feb 25, 2022
1 parent 85680a0 commit 7c3ad44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/folio/ncip/FolioRemoteServiceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.http.util.EntityUtils;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;

public class FolioRemoteServiceManager implements RemoteServiceManager {

Expand Down Expand Up @@ -268,7 +269,7 @@ public JsonObject checkIn(CheckInItemInitiationData initData, String agencyId) t
}

DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
LocalDateTime now = LocalDateTime.now();
ZonedDateTime now = ZonedDateTime.now();
String returnDate = dtf.format(now);

String itemBarcode = initData.getItemId().getItemIdentifierValue();
Expand Down Expand Up @@ -502,7 +503,7 @@ public JsonObject acceptItem(AcceptItemInitiationData initData, UserId userId, S
String sPointId = servicePoints.getJsonArray("servicepoints").getJsonObject(0).getString("id");
request.put("pickupServicePointId", sPointId);
DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
LocalDateTime now = LocalDateTime.now();
ZonedDateTime now = ZonedDateTime.now();
request.put("requestDate", dtf.format(now));

url = baseUrl + Constants.REQUEST_URL;
Expand Down

0 comments on commit 7c3ad44

Please sign in to comment.