Skip to content

Commit bf594dc

Browse files
authored
Merge pull request #156 from CPIGroup/master
Version 1.4.2
2 parents 317b266 + cb8f5c9 commit bf594dc

14 files changed

+27
-23
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## 1.4.2 - 2018-03-07
6+
### Changed
7+
- Fixed timestamp to fully comply with ISO8601 standard
8+
59
## 1.4.1 - 2018-01-19
610
### Changed
711
- Fixed parameter names for Product Fees Estimates

includes/classes/AmazonCore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ protected function genTime($time=false){
568568
} else {
569569
throw new InvalidArgumentException('Invalid time input given');
570570
}
571-
return date('Y-m-d\TH:i:sO',$time-120);
571+
return date('c', $time-120);
572572

573573
}
574574

test-cases/includes/classes/AmazonFeedListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ public function testSetTimeLimits($a, $b, $c, $d){
124124
$o = $this->object->getOptions();
125125
if ($c){
126126
$this->assertArrayHasKey('SubmittedFromDate',$o);
127-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['SubmittedFromDate']);
127+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['SubmittedFromDate']);
128128
} else {
129129
$this->assertArrayNotHasKey('SubmittedFromDate',$o);
130130
}
131131

132132
if ($d){
133133
$this->assertArrayHasKey('SubmittedToDate',$o);
134-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['SubmittedToDate']);
134+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['SubmittedToDate']);
135135
} else {
136136
$this->assertArrayNotHasKey('SubmittedToDate',$o);
137137
}

test-cases/includes/classes/AmazonFinancialEventListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testSetTimeLimits($a, $b, $c, $d){
6060
if ($c) {
6161
$this->assertNull($try);
6262
$this->assertArrayHasKey('PostedAfter', $o);
63-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['PostedAfter']);
63+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['PostedAfter']);
6464
$this->assertArrayNotHasKey('AmazonOrderId', $o);
6565
} else {
6666
$this->assertFalse($try);
@@ -70,7 +70,7 @@ public function testSetTimeLimits($a, $b, $c, $d){
7070

7171
if ($c && $d) {
7272
$this->assertArrayHasKey('PostedBefore', $o);
73-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['PostedBefore']);
73+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['PostedBefore']);
7474
//setting only first date resets second one
7575
$this->assertNull($this->object->setTimeLimits($a));
7676
$o2 = $this->object->getOptions();

test-cases/includes/classes/AmazonFinancialGroupListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ public function testSetTimeLimits($a, $b, $c, $d){
5959
if ($c) {
6060
$this->assertNull($try);
6161
$this->assertArrayHasKey('FinancialEventGroupStartedAfter', $o);
62-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['FinancialEventGroupStartedAfter']);
62+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['FinancialEventGroupStartedAfter']);
6363
} else {
6464
$this->assertFalse($try);
6565
$this->assertArrayNotHasKey('FinancialEventGroupStartedAfter', $o);
6666
}
6767

6868
if ($c && $d) {
6969
$this->assertArrayHasKey('FinancialEventGroupStartedBefore', $o);
70-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['FinancialEventGroupStartedBefore']);
70+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['FinancialEventGroupStartedBefore']);
7171
//setting only first date resets second one
7272
$this->assertNull($this->object->setTimeLimits($a));
7373
$o2 = $this->object->getOptions();

test-cases/includes/classes/AmazonFulfillmentOrderCreatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ public function testSetDeliveryWindow($a, $b, $c) {
291291
$o = $this->object->getOptions();
292292
if ($c) {
293293
$this->assertArrayHasKey('DeliveryWindow.StartDateTime', $o);
294-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['DeliveryWindow.StartDateTime']);
294+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['DeliveryWindow.StartDateTime']);
295295
$this->assertArrayHasKey('DeliveryWindow.EndDateTime', $o);
296-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i', $o['DeliveryWindow.EndDateTime']);
296+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['DeliveryWindow.EndDateTime']);
297297
} else {
298298
$this->assertArrayNotHasKey('DeliveryWindow.StartDateTime', $o);
299299
$this->assertArrayNotHasKey('DeliveryWindow.EndDateTime', $o);

test-cases/includes/classes/AmazonFulfillmentOrderListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testSetStartTime(){
3333
$this->assertNull($this->object->setStartTime('-1 min'));
3434
$o = $this->object->getOptions();
3535
$this->assertArrayHasKey('QueryStartDateTime',$o);
36-
$this->assertNotEquals('1969-12-31T18:58:00-0500',$o['QueryStartDateTime']);
36+
$this->assertNotEquals('1969-12-31T18:58:00-05:00', $o['QueryStartDateTime']);
3737
}
3838

3939
public function testSetUseToken(){

test-cases/includes/classes/AmazonInventoryListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testSetStartTime(){
4141
$this->assertNull($this->object->setStartTime('-1 min'));
4242
$o = $this->object->getOptions();
4343
$this->assertArrayHasKey('QueryStartDateTime',$o);
44-
$this->assertNotEquals('1969-12-31T18:58:00-0500',$o['QueryStartDateTime']);
44+
$this->assertNotEquals('1969-12-31T18:58:00-05:00', $o['QueryStartDateTime']);
4545
$this->assertArrayNotHasKey('SellerSkus.member.1',$o);
4646
}
4747

test-cases/includes/classes/AmazonReportListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ public function testSetTimeLimits($a, $b, $c, $d){
137137
$o = $this->object->getOptions();
138138
if ($c){
139139
$this->assertArrayHasKey('AvailableFromDate',$o);
140-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['AvailableFromDate']);
140+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['AvailableFromDate']);
141141
} else {
142142
$this->assertArrayNotHasKey('AvailableFromDate',$o);
143143
}
144144

145145
if ($d){
146146
$this->assertArrayHasKey('AvailableToDate',$o);
147-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['AvailableToDate']);
147+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['AvailableToDate']);
148148
} else {
149149
$this->assertArrayNotHasKey('AvailableToDate',$o);
150150
}

test-cases/includes/classes/AmazonReportRequestListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ public function testSetTimeLimits($a, $b, $c, $d){
149149
$o = $this->object->getOptions();
150150
if ($c){
151151
$this->assertArrayHasKey('RequestedFromDate',$o);
152-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['RequestedFromDate']);
152+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['RequestedFromDate']);
153153
} else {
154154
$this->assertArrayNotHasKey('RequestedFromDate',$o);
155155
}
156156

157157
if ($d){
158158
$this->assertArrayHasKey('RequestedToDate',$o);
159-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['RequestedToDate']);
159+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['RequestedToDate']);
160160
} else {
161161
$this->assertArrayNotHasKey('RequestedToDate',$o);
162162
}

test-cases/includes/classes/AmazonReportRequestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ public function testSetTimeLimits($a, $b, $c, $d){
5858
$o = $this->object->getOptions();
5959
if ($c){
6060
$this->assertArrayHasKey('StartDate',$o);
61-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['StartDate']);
61+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['StartDate']);
6262
} else {
6363
$this->assertArrayNotHasKey('StartDate',$o);
6464
}
6565

6666
if ($d){
6767
$this->assertArrayHasKey('EndDate',$o);
68-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['EndDate']);
68+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['EndDate']);
6969
} else {
7070
$this->assertArrayNotHasKey('EndDate',$o);
7171
}

test-cases/includes/classes/AmazonReportScheduleManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function testSetScheduledDate(){
5151
$this->assertNull($this->object->setScheduledDate('-1 min'));
5252
$o = $this->object->getOptions();
5353
$this->assertArrayHasKey('ScheduledDate',$o);
54-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['ScheduledDate']);
55-
$this->assertNotEquals('1969-12-31T18:58:00-0500',$o['ScheduledDate']);
54+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['ScheduledDate']);
55+
$this->assertNotEquals('1969-12-31T18:58:00-05:00', $o['ScheduledDate']);
5656
}
5757

5858
public function testManageReportSchedule(){

test-cases/includes/classes/AmazonShipmentItemListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public function testSetTimeLimits($a, $b){
7373
$this->object->setTimeLimits($a,$b);
7474
$o = $this->object->getOptions();
7575
$this->assertArrayHasKey('LastUpdatedAfter',$o);
76-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['LastUpdatedAfter']);
76+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['LastUpdatedAfter']);
7777
$this->assertArrayHasKey('LastUpdatedBefore',$o);
78-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['LastUpdatedBefore']);
78+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['LastUpdatedBefore']);
7979
}
8080

8181
public function testResetTimeLimit(){

test-cases/includes/classes/AmazonShipmentListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ public function testSetTimeLimits($a, $b){
8888
$this->object->setTimeLimits($a,$b);
8989
$o = $this->object->getOptions();
9090
$this->assertArrayHasKey('LastUpdatedAfter',$o);
91-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['LastUpdatedAfter']);
91+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['LastUpdatedAfter']);
9292
$this->assertArrayHasKey('LastUpdatedBefore',$o);
93-
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i',$o['LastUpdatedBefore']);
93+
$this->assertStringMatchesFormat('%d-%d-%dT%d:%d:%d%i:%i', $o['LastUpdatedBefore']);
9494
}
9595

9696
public function testResetTimeLimit(){

0 commit comments

Comments
 (0)