The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 2040a483 authored by Demian Katz's avatar Demian Katz
Browse files

Resolving VUFIND-795 (Date conversion problem in HorizonXMLAPI).

Thanks to Jay Roos.
parent adf00741
No related merge requests found
......@@ -8,6 +8,8 @@ database = mydatabase
[Webservices]
profile = "xxx--1"
HIPurl = http://hip.myuniversity.edu/ipac20/ipac.jsp
; Specify the date format used by HIP. m/d/Y or d/m/Y
dateformat = "m/d/Y"
[pickUpLocations]
; This setting is used to define library codes and names which are used by the
......
......@@ -83,6 +83,10 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
$this->wsDefaultPickUpLocation
= (isset($this->config['Holds']['defaultPickUpLocation']))
? $this->config['Holds']['defaultPickUpLocation'] : false;
$this->wsDateFormat
= (isset($this->config['Webservices']['dateformat']))
? $this->config['Webservices']['dateformat'] : 'd/m/Y';
}
/**
......@@ -700,11 +704,12 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
$currentRenewals = (string)$renewData->itemout[$i]->numrenewals;
$dueDate = (string)$renewData->itemout[$i]->duedate;
$renewerror = (string)$renewData->itemout[$i]->renewerror;
// Convert Horizon Format to display format
if (!empty($dueDate)) {
$currentDueDate = $this->dateFormat->convertToDisplayDate(
"d/m/Y", $dueDate
$this->wsDateFormat, $dueDate
);
}
......@@ -720,7 +725,8 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
$response['details'][$ikey] = array(
'item_id' => $ikey,
'new_date' => "",
'success' => false
'success' => false,
'sysMessage' => $renewerror
);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment