Skip to content

Commit 389c2c2

Browse files
author
Mplus Software
committed
Bugfix in conversion of dates and timestamps.
1 parent f35320a commit 389c2c2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Mplusqapiclient.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class MplusQAPIclient
88
{
9-
const CLIENT_VERSION = '0.3.0';
9+
const CLIENT_VERSION = '0.3.1';
1010

1111
var $MIN_API_VERSION_MAJOR = 0;
1212
var $MIN_API_VERSION_MINOR = 3;
@@ -904,6 +904,12 @@ public function parseGetTableOrderResult($soapGetTableOrderResult) {
904904
if (isset($soapGetTableOrderResult->order)) {
905905
$soapOrder = $soapGetTableOrderResult->order;
906906
$order = objectToArray($soapOrder);
907+
if (isset($order['financialDate'])) {
908+
$order['financialDate'] = $this->parseMplusDate($order['financialDate']);
909+
}
910+
if (isset($order['entryTimestamp'])) {
911+
$order['entryTimestamp'] = $this->parseMplusDateTime($order['entryTimestamp']);
912+
}
907913
if (isset($order['lineList']['line'])) {
908914
$order['lineList'] = $order['lineList']['line'];
909915
}
@@ -1580,6 +1586,11 @@ public function convertMplusDateTime($timestamp)
15801586
'day' => date('j', $timestamp),
15811587
'mon' => date('n', $timestamp),
15821588
'year' => date('Y', $timestamp),
1589+
'hour' => date('H', $timestamp),
1590+
'min' => date('i', $timestamp),
1591+
'sec' => date('s', $timestamp),
1592+
'isdst' => false,
1593+
'timezone' => 0,
15831594
);
15841595
} // END convertMplusDateTime()
15851596

@@ -1602,11 +1613,6 @@ public function convertMplusDate($timestamp)
16021613
'day' => date('j', $timestamp),
16031614
'mon' => date('n', $timestamp),
16041615
'year' => date('Y', $timestamp),
1605-
'hour' => date('H', $timestamp),
1606-
'min' => date('i', $timestamp),
1607-
'sec' => date('s', $timestamp),
1608-
'isdst' => false,
1609-
'timezone' => 0,
16101616
);
16111617
} // END convertMplusDate()
16121618

0 commit comments

Comments
 (0)